local Players = game:GetService("Players") local RunService = game:GetService("RunService") local UserInputService = game:GetService("UserInputService") local LocalPlayer = Players.LocalPlayer local PlayerGui = LocalPlayer:WaitForChild("PlayerGui") local gui = Instance.new("ScreenGui", PlayerGui) gui.Name = "PositionDisplayGui" local frame = Instance.new("Frame", gui) frame.Size = UDim2.new(0, 300, 0, 100) frame.Position = UDim2.new(0, 50, 0, 50) frame.BackgroundColor3 = Color3.fromRGB(30, 30, 30) frame.BorderSizePixel = 0 frame.Active = true Instance.new("UICorner", frame).CornerRadius = UDim.new(0, 15) local title = Instance.new("TextLabel", frame) title.Size = UDim2.new(1, 0, 0, 25) title.Position = UDim2.new(0, 0, 0, 0) title.BackgroundTransparency = 1 title.Text = "الإحداثيات" title.Font = Enum.Font.SourceSansBold title.TextSize = 20 title.TextColor3 = Color3.fromRGB(255, 255, 255) title.TextXAlignment = Enum.TextXAlignment.Center local closeBtn = Instance.new("TextButton", frame) closeBtn.Size = UDim2.new(0, 30, 0, 30) closeBtn.Position = UDim2.new(1, -35, 0, 5) closeBtn.BackgroundColor3 = Color3.fromRGB(180, 30, 30) closeBtn.Text = "✕" closeBtn.TextColor3 = Color3.new(1, 1, 1) closeBtn.Font = Enum.Font.SourceSansBold closeBtn.TextSize = 24 Instance.new("UICorner", closeBtn).CornerRadius = UDim.new(0, 10) closeBtn.MouseButton1Click:Connect(function() gui:Destroy() end) local label = Instance.new("TextLabel", frame) label.Size = UDim2.new(1, -20, 1, -35) label.Position = UDim2.new(0, 10, 0, 30) label.BackgroundTransparency = 1 label.TextColor3 = Color3.fromRGB(255, 255, 255) label.Font = Enum.Font.SourceSansBold label.TextSize = 18 label.TextXAlignment = Enum.TextXAlignment.Left label.TextYAlignment = Enum.TextYAlignment.Top label.Text = "جارٍ التحميل..." local dragging = false local dragInput local dragStart local startPos local function updatePosition(input) local delta = input.Position - dragStart frame.Position = UDim2.new( startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y ) end frame.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then dragging = true dragStart = input.Position startPos = frame.Position input.Changed:Connect(function() if input.UserInputState == Enum.UserInputState.End then dragging = false end end) end end) frame.InputChanged:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then dragInput = input end end) UserInputService.InputChanged:Connect(function(input) if dragging and input == dragInput then updatePosition(input) end end) RunService.Heartbeat:Connect(function() local character = LocalPlayer.Character if character and character:FindFirstChild("HumanoidRootPart") then local pos = character.HumanoidRootPart.Position label.Text = string.format("X: %.2f\nY: %.2f\nZ: %.2f", pos.X, pos.Y, pos.Z) else label.Text = "الإحداثيات غير متوفرة" end end)