--// Services local Players = game:GetService("Players") local TweenService = game:GetService("TweenService") local UserInputService = game:GetService("UserInputService") local player = Players.LocalPlayer --// GUI作成 local ScreenGui = Instance.new("ScreenGui") ScreenGui.Name = "CoordinateGUI" ScreenGui.Parent = player:WaitForChild("PlayerGui") ScreenGui.ResetOnSpawn = false -- メインフレーム local MainFrame = Instance.new("Frame") MainFrame.Size = UDim2.new(0, 320, 0, 160) MainFrame.Position = UDim2.new(0.5, -160, 0.5, -80) MainFrame.BackgroundColor3 = Color3.fromRGB(30, 30, 35) MainFrame.BackgroundTransparency = 0.1 MainFrame.BorderSizePixel = 0 MainFrame.Parent = ScreenGui MainFrame.AnchorPoint = Vector2.new(0.5, 0.5) -- 角丸 Instance.new("UICorner", MainFrame).CornerRadius = UDim.new(0, 14) -- 軽い立体感 local Stroke = Instance.new("UIStroke", MainFrame) Stroke.Thickness = 1 Stroke.Color = Color3.fromRGB(80, 80, 90) Stroke.Transparency = 0.4 local Shadow = Instance.new("ImageLabel") Shadow.Parent = MainFrame Shadow.BackgroundTransparency = 1 Shadow.Size = UDim2.new(1, 20, 1, 20) Shadow.Position = UDim2.new(0, -10, 0, -10) Shadow.Image = "rbxassetid://1316045217" Shadow.ImageTransparency = 0.8 Shadow.ScaleType = Enum.ScaleType.Slice Shadow.SliceCenter = Rect.new(10,10,118,118) Shadow.ZIndex = 0 -- タイトル local Title = Instance.new("TextLabel") Title.Parent = MainFrame Title.Size = UDim2.new(1, 0, 0, 30) Title.BackgroundTransparency = 1 Title.Text = "Current Position" Title.TextColor3 = Color3.new(1,1,1) Title.TextSize = 18 Title.Font = Enum.Font.GothamBold -- 座標表示 local PositionLabel = Instance.new("TextLabel") PositionLabel.Parent = MainFrame PositionLabel.Size = UDim2.new(1, -20, 0, 40) PositionLabel.Position = UDim2.new(0, 10, 0, 45) PositionLabel.BackgroundTransparency = 1 PositionLabel.TextWrapped = true PositionLabel.TextColor3 = Color3.fromRGB(220,220,220) PositionLabel.TextSize = 14 PositionLabel.Font = Enum.Font.Gotham PositionLabel.Text = "Loading..." -- コピーボタン local CopyButton = Instance.new("TextButton") CopyButton.Parent = MainFrame CopyButton.Size = UDim2.new(0.6, 0, 0, 35) CopyButton.Position = UDim2.new(0.2, 0, 1, -45) CopyButton.Text = "Copy Position" CopyButton.Font = Enum.Font.GothamBold CopyButton.TextSize = 14 CopyButton.TextColor3 = Color3.new(1,1,1) CopyButton.BackgroundColor3 = Color3.fromRGB(60,120,255) CopyButton.AutoButtonColor = false Instance.new("UICorner", CopyButton).CornerRadius = UDim.new(0, 10) -- ボタンホバーアニメーション local function animateButton(button, color) local tween = TweenService:Create(button, TweenInfo.new(0.25, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), { BackgroundColor3 = color }) tween:Play() end CopyButton.MouseEnter:Connect(function() animateButton(CopyButton, Color3.fromRGB(80,140,255)) end) CopyButton.MouseLeave:Connect(function() animateButton(CopyButton, Color3.fromRGB(60,120,255)) end) -- 最小化・最大化・閉じる local function createTopButton(text, xPos) local btn = Instance.new("TextButton") btn.Parent = MainFrame btn.Size = UDim2.new(0, 28, 0, 28) btn.Position = UDim2.new(1, xPos, 0, 1) btn.Text = text btn.TextSize = 14 btn.Font = Enum.Font.GothamBold btn.TextColor3 = Color3.new(1,1,1) btn.BackgroundColor3 = Color3.fromRGB(50,50,60) btn.AutoButtonColor = false Instance.new("UICorner", btn).CornerRadius = UDim.new(1,0) return btn end local MinBtn = createTopButton("-", -96) local MaxBtn = createTopButton("+", -64) local CloseBtn = createTopButton("X", -32) -- アニメーション設定 local tweenInfo = TweenInfo.new(0.3, Enum.EasingStyle.Quint, Enum.EasingDirection.Out) -- 最小化 MinBtn.MouseButton1Click:Connect(function() TweenService:Create(MainFrame, tweenInfo, {Size = UDim2.new(0, 320, 0, 40)}):Play() end) -- 最大化 MaxBtn.MouseButton1Click:Connect(function() TweenService:Create(MainFrame, tweenInfo, {Size = UDim2.new(0, 320, 0, 160)}):Play() end) -- 閉じる CloseBtn.MouseButton1Click:Connect(function() TweenService:Create(MainFrame, tweenInfo, {BackgroundTransparency = 1}):Play() wait(0.3) ScreenGui:Destroy() end) -- 座標更新 local function updatePosition() local char = player.Character if char and char:FindFirstChild("HumanoidRootPart") then local pos = char.HumanoidRootPart.Position PositionLabel.Text = string.format("X: %.2f\nY: %.2f\nZ: %.2f", pos.X, pos.Y, pos.Z) end end game:GetService("RunService").RenderStepped:Connect(updatePosition) -- コピー機能 CopyButton.MouseButton1Click:Connect(function() if setclipboard then setclipboard(PositionLabel.Text) CopyButton.Text = "Copied!" wait(1) CopyButton.Text = "Copy Position" end end) -- ドラッグ対応(PC & モバイル) local dragging = false local dragStart local startPos MainFrame.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then dragging = true dragStart = input.Position startPos = MainFrame.Position end end) UserInputService.InputChanged:Connect(function(input) if dragging and (input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch) then local delta = input.Position - dragStart MainFrame.Position = UDim2.new( startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y ) end end) UserInputService.InputEnded:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then dragging = false end end)