Advertisement
Dragos2K11

Untitled

Jun 23rd, 2025
201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.01 KB | None | 0 0
  1. local RunService = game:GetService("RunService")
  2. local Players = game:GetService("Players")
  3.  
  4. local player = Players.LocalPlayer
  5. local screenGui = Instance.new("ScreenGui")
  6. screenGui.Name = "CoordinatesDisplay"
  7. screenGui.ResetOnSpawn = false
  8. screenGui.Parent = player:WaitForChild("PlayerGui")
  9.  
  10. local textLabel = Instance.new("TextLabel")
  11. textLabel.Size = UDim2.new(0, 250, 0, 30)
  12. textLabel.Position = UDim2.new(0, 10, 0, 10)
  13. textLabel.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
  14. textLabel.BackgroundTransparency = 0.3
  15. textLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  16. textLabel.Font = Enum.Font.SourceSans
  17. textLabel.TextSize = 18
  18. textLabel.Text = "Position: ..."
  19. textLabel.Parent = screenGui
  20.  
  21. RunService.RenderStepped:Connect(function()
  22.     local character = player.Character
  23.     local rootPart = character and character:FindFirstChild("HumanoidRootPart")
  24.     if rootPart then
  25.         local pos = rootPart.Position
  26.         textLabel.Text = string.format("Position: X: %.1f, Y: %.1f, Z: %.1f", pos.X, pos.Y, pos.Z)
  27.     end
  28. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement