AutumnMoon88683

Roblox Position Gui

Dec 6th, 2024
12
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.14 KB | None | 0 0
  1. -- Gui to Lua
  2. -- Version: 3.2
  3.  
  4. -- Instances:
  5.  
  6. local ZayasPositionGui = Instance.new("ScreenGui")
  7. local TextBox = Instance.new("TextBox")
  8. local TextLabel = Instance.new("TextLabel")
  9.  
  10. --Properties:
  11.  
  12. if game.Players.LocalPlayer.PlayerGui:FindFirstChild("Zaya's Position Gui") then
  13.     game.Players.LocalPlayer.PlayerGui["Zaya's Position Gui"]:Destroy()
  14. end
  15.  
  16. ZayasPositionGui.Name = "Zaya's Position Gui"
  17. ZayasPositionGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
  18.  
  19. TextBox.Parent = ZayasPositionGui
  20. TextBox.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  21. TextBox.BackgroundTransparency = 1.000
  22. TextBox.BorderColor3 = Color3.fromRGB(0, 0, 0)
  23. TextBox.BorderSizePixel = 0
  24. TextBox.Position = UDim2.new(0, 0, 0.150000006, 0)
  25. TextBox.Size = UDim2.new(0.150000006, 0, 0, 50)
  26. TextBox.ClearTextOnFocus = false
  27. TextBox.Font = Enum.Font.GothamMedium
  28. TextBox.Text = "0,0,0"
  29. TextBox.TextColor3 = Color3.fromRGB(0, 0, 0)
  30. TextBox.TextScaled = true
  31. TextBox.TextSize = 14.000
  32. TextBox.TextStrokeColor3 = Color3.fromRGB(255, 255, 255)
  33. TextBox.TextStrokeTransparency = 0.000
  34. TextBox.TextWrapped = true
  35.  
  36. TextLabel.Parent = ZayasPositionGui
  37. TextLabel.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  38. TextLabel.BackgroundTransparency = 1.000
  39. TextLabel.BorderColor3 = Color3.fromRGB(0, 0, 0)
  40. TextLabel.BorderSizePixel = 0
  41. TextLabel.Position = UDim2.new(0.170000002, 0, 0.150000006, 0)
  42. TextLabel.Size = UDim2.new(0.150000006, 0, 0, 50)
  43. TextLabel.Font = Enum.Font.SourceSans
  44. TextLabel.Text = "InfoGoesHere"
  45. TextLabel.TextColor3 = Color3.fromRGB(0, 0, 0)
  46. TextLabel.TextScaled = true
  47. TextLabel.TextSize = 14.000
  48. TextLabel.TextStrokeColor3 = Color3.fromRGB(255, 255, 255)
  49. TextLabel.TextStrokeTransparency = 0.000
  50. TextLabel.TextWrapped = true
  51.  
  52. -- Scripts:
  53.  
  54. local function RDJKK_fake_script() -- ZayasPositionGui.Main
  55.     local script = Instance.new('LocalScript', ZayasPositionGui)
  56.  
  57.     local uis = game:GetService("UserInputService")
  58.    
  59.     local tb = script.Parent:WaitForChild("TextBox")
  60.    
  61.     local plr = game.Players.LocalPlayer
  62.    
  63.     local char = plr.Character or plr.CharacterAdded:Wait()
  64.    
  65.     local ToggleGui = Enum.KeyCode.F2
  66.    
  67.     local DeleteGui = Enum.KeyCode.F1
  68.    
  69.     local function ShortenMath(Number)
  70.         if Number == math.floor(Number) then
  71.             return tostring(Number)
  72.         else
  73.             return string.format("%.2f", Number)
  74.         end
  75.     end
  76.    
  77.     uis.InputBegan:Connect(function(input,chat)
  78.         if chat then return end
  79.        
  80.         if input.KeyCode == DeleteGui then
  81.             script.Parent:Destroy()
  82.         elseif input.KeyCode == ToggleGui then 
  83.             script.Parent.Enabled = not script.Parent.Enabled
  84.         end
  85.     end)
  86.    
  87.     while true do
  88.         wait()
  89.        
  90.         script.Parent.TextLabel.Text = "Press "..ToggleGui.Name.." to toggle this GUI.\nPress "..DeleteGui.Name.." to delete this GUI."
  91.        
  92.         char = plr.Character or plr.CharacterAdded:Wait()
  93.        
  94.         local root = char.PrimaryPart or char:FindFirstChildWhichIsA("Humanoid").RootPart or char:FindFirstChild("Head")
  95.        
  96.         if root then
  97.             local x, y, z = root.Position.X, root.Position.Y, root.Position.Z
  98.             tb.Text = "Position (X,Y,Z):\n"..ShortenMath(x)..", "..ShortenMath(y)..", "..ShortenMath(z)
  99.         end
  100.     end
  101. end
  102. coroutine.wrap(RDJKK_fake_script)()
  103.  
Add Comment
Please, Sign In to add comment