Zuklim65

Executor450reals coordinate script

Feb 25th, 2025
14
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.40 KB | None | 0 0
  1. local player = game.Players.LocalPlayer
  2. local character = player.Character or player.CharacterAdded:Wait()
  3.  
  4. -- Create ScreenGui
  5. local screenGui = Instance.new("ScreenGui")
  6. screenGui.Parent = player:FindFirstChild("PlayerGui")
  7.  
  8. -- Create Main Frame
  9. local mainFrame = Instance.new("Frame")
  10. mainFrame.Size = UDim2.new(0.4, 0, 0.3, 0)
  11. mainFrame.Position = UDim2.new(0.3, 0, 0.3, 0)
  12. mainFrame.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
  13. mainFrame.BorderSizePixel = 2
  14. mainFrame.Parent = screenGui
  15.  
  16. -- Create Close (X) Button
  17. local closeButton = Instance.new("TextButton")
  18. closeButton.Size = UDim2.new(0.15, 0, 0.2, 0)
  19. closeButton.Position = UDim2.new(0.85, 0, 0, 0)
  20. closeButton.BackgroundColor3 = Color3.fromRGB(255, 0, 0)
  21. closeButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  22. closeButton.Text = "X"
  23. closeButton.TextScaled = true
  24. closeButton.Parent = mainFrame
  25.  
  26. -- Create Show (✔) Button
  27. local showButton = Instance.new("TextButton")
  28. showButton.Size = UDim2.new(0.15, 0, 0.1, 0)
  29. showButton.Position = UDim2.new(0.425, 0, 0.65, 0)
  30. showButton.BackgroundColor3 = Color3.fromRGB(0, 255, 0)
  31. showButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  32. showButton.Text = "✔"
  33. showButton.TextScaled = true
  34. showButton.Visible = false
  35. showButton.Parent = screenGui
  36.  
  37. -- Create Coordinate Label
  38. local coordinateLabel = Instance.new("TextLabel")
  39. coordinateLabel.Size = UDim2.new(0.8, 0, 0.2, 0)
  40. coordinateLabel.Position = UDim2.new(0.1, 0, 0.2, 0)
  41. coordinateLabel.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
  42. coordinateLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  43. coordinateLabel.Text = "0, 0, 0"
  44. coordinateLabel.TextScaled = true
  45. coordinateLabel.Parent = mainFrame
  46.  
  47. -- Create Generate Button
  48. local generateButton = Instance.new("TextButton")
  49. generateButton.Size = UDim2.new(0.4, 0, 0.2, 0)
  50. generateButton.Position = UDim2.new(0.05, 0, 0.6, 0)
  51. generateButton.BackgroundColor3 = Color3.fromRGB(0, 150, 255)
  52. generateButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  53. generateButton.Text = "Generate"
  54. generateButton.TextScaled = true
  55. generateButton.Parent = mainFrame
  56.  
  57. -- Create Copy Button
  58. local copyButton = Instance.new("TextButton")
  59. copyButton.Size = UDim2.new(0.4, 0, 0.2, 0)
  60. copyButton.Position = UDim2.new(0.55, 0, 0.6, 0)
  61. copyButton.BackgroundColor3 = Color3.fromRGB(0, 255, 150)
  62. copyButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  63. copyButton.Text = "Copy"
  64. copyButton.TextScaled = true
  65. copyButton.Parent = mainFrame
  66.  
  67. -- Function to update coordinates
  68. local function updateCoordinates()
  69. if character and character:FindFirstChild("HumanoidRootPart") then
  70. local position = character.HumanoidRootPart.Position
  71. local coords = string.format("%d, %d, %d", position.X, position.Y, position.Z)
  72. coordinateLabel.Text = coords
  73. end
  74. end
  75.  
  76. -- Function to copy coordinates
  77. local function copyCoordinates()
  78. if coordinateLabel.Text ~= "0, 0, 0" then
  79. setclipboard(coordinateLabel.Text) -- Copies text
  80. end
  81. end
  82.  
  83. -- Function to hide GUI
  84. local function hideGUI()
  85. mainFrame.Visible = false
  86. showButton.Visible = true
  87. end
  88.  
  89. -- Function to show GUI
  90. local function showGUI()
  91. mainFrame.Visible = true
  92. showButton.Visible = false
  93. end
  94.  
  95. -- Connect buttons
  96. generateButton.MouseButton1Click:Connect(updateCoordinates)
  97. copyButton.MouseButton1Click:Connect(copyCoordinates)
  98. closeButton.MouseButton1Click:Connect(hideGUI)
  99. showButton.MouseButton1Click:Connect(showGUI)
Add Comment
Please, Sign In to add comment