Advertisement
Scriptorz5

Coordinates gui

Oct 18th, 2019
3,886
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.57 KB | None | 0 0
  1. -- Gui to Lua
  2. -- Version: 3
  3.  
  4. -- Instances:
  5.  
  6. local ScreenGui = Instance.new("ScreenGui")
  7. local df = Instance.new("Frame")
  8. local main = Instance.new("Frame")
  9. local upd = Instance.new("TextButton")
  10. local T = Instance.new("TextBox")
  11. local exit = Instance.new("TextButton")
  12. local mini = Instance.new("TextButton")
  13.  
  14. --Properties:
  15.  
  16. ScreenGui.Parent = game.CoreGui
  17.  
  18. df.Name = "df"
  19. df.Parent = ScreenGui
  20. df.BackgroundColor3 = Color3.new(0.478431, 0.478431, 0.478431)
  21. df.BorderSizePixel = 0
  22. df.Position = UDim2.new(0.245710373, 0, 0.362407863, 0)
  23. df.Size = UDim2.new(0, 190, 0, 18)
  24.  
  25. main.Name = "main"
  26. main.Parent = df
  27. main.BackgroundColor3 = Color3.new(0.384314, 0.384314, 0.384314)
  28. main.BorderSizePixel = 0
  29. main.Position = UDim2.new(0, 0, 1, 0)
  30. main.Size = UDim2.new(0, 190, 0, 87)
  31.  
  32. upd.Name = "upd"
  33. upd.Parent = main
  34. upd.BackgroundColor3 = Color3.new(0.478431, 0.478431, 0.478431)
  35. upd.BorderSizePixel = 0
  36. upd.Position = UDim2.new(0.0315789469, 0, 0.678160906, 0)
  37. upd.Size = UDim2.new(0, 178, 0, 22)
  38. upd.Font = Enum.Font.GothamBold
  39. upd.Text = "Update position"
  40. upd.TextColor3 = Color3.new(1, 1, 1)
  41. upd.TextSize = 14
  42.  
  43. T.Name = "T"
  44. T.Parent = main
  45. T.BackgroundColor3 = Color3.new(1, 1, 1)
  46. T.BackgroundTransparency = 1
  47. T.Position = UDim2.new(0.0315789469, 0, 0, 0)
  48. T.Size = UDim2.new(0, 178, 0, 59)
  49. T.ClearTextOnFocus = false
  50. T.Font = Enum.Font.GothamBold
  51. T.Text = ""
  52. T.TextColor3 = Color3.new(1, 1, 1)
  53. T.TextSize = 14
  54. T.TextWrapped = true
  55.  
  56. exit.Name = "exit"
  57. exit.Parent = df
  58. exit.BackgroundColor3 = Color3.new(1, 1, 1)
  59. exit.BackgroundTransparency = 1
  60. exit.Position = UDim2.new(0.905263186, 0, 0, 0)
  61. exit.Size = UDim2.new(0, 18, 0, 18)
  62. exit.Font = Enum.Font.GothamBold
  63. exit.Text = "x"
  64. exit.TextColor3 = Color3.new(1, 1, 1)
  65. exit.TextSize = 14
  66.  
  67. mini.Name = "mini"
  68. mini.Parent = df
  69. mini.BackgroundColor3 = Color3.new(1, 1, 1)
  70. mini.BackgroundTransparency = 1
  71. mini.Position = UDim2.new(0.810526371, 0, 0, 0)
  72. mini.Size = UDim2.new(0, 18, 0, 18)
  73. mini.Font = Enum.Font.GothamBold
  74. mini.Text = "-"
  75. mini.TextColor3 = Color3.new(1, 1, 1)
  76. mini.TextSize = 14
  77.  
  78. -- Scripts:
  79.  
  80. local function WCZUZKA_fake_script() -- df.dragging
  81. local script = Instance.new('LocalScript', df)
  82.  
  83. local UserInputService = game:GetService("UserInputService")
  84.  
  85. local gui = script.Parent
  86.  
  87. local dragging
  88. local dragInput
  89. local dragStart
  90. local startPos
  91.  
  92. local function update(input)
  93. local delta = input.Position - dragStart
  94. wait() -- remove this line if you don't want the dragging to be smoother
  95. gui.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
  96. end
  97.  
  98. gui.InputBegan:Connect(function(input)
  99. if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
  100. dragging = true
  101. dragStart = input.Position
  102. startPos = gui.Position
  103.  
  104. input.Changed:Connect(function()
  105. if input.UserInputState == Enum.UserInputState.End then
  106. dragging = false
  107. end
  108. end)
  109. end
  110. end)
  111.  
  112. gui.InputChanged:Connect(function(input)
  113. if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then
  114. dragInput = input
  115. end
  116. end)
  117.  
  118. UserInputService.InputChanged:Connect(function(input)
  119. if input == dragInput and dragging then
  120. update(input)
  121. end
  122. end)
  123. end
  124. coroutine.wrap(WCZUZKA_fake_script)()
  125. local function XDVJ_fake_script() -- upd.LocalScript
  126. local script = Instance.new('LocalScript', upd)
  127.  
  128. script.Parent.MouseButton1Click:Connect(function()
  129. script.Parent.Parent.T.Text = tostring(game.Players.LocalPlayer.Character.HumanoidRootPart.Position)
  130. end)
  131. end
  132. coroutine.wrap(XDVJ_fake_script)()
  133. local function GMIYA_fake_script() -- T.LocalScript
  134. local script = Instance.new('LocalScript', T)
  135.  
  136. script.Parent.Text = tostring(game.Players.LocalPlayer.Character:WaitForChild("HumanoidRootPart").Position)
  137. end
  138. coroutine.wrap(GMIYA_fake_script)()
  139. local function PKTHP_fake_script() -- exit.LocalScript
  140. local script = Instance.new('LocalScript', exit)
  141.  
  142. script.Parent.MouseButton1Click:Connect(function()
  143. script.Parent.Parent.Parent:Destroy()
  144. end)
  145. end
  146. coroutine.wrap(PKTHP_fake_script)()
  147. local function GDVRJ_fake_script() -- mini.LocalScript
  148. local script = Instance.new('LocalScript', mini)
  149.  
  150. local q = false script.Parent.MouseButton1Click:Connect(function()if q==false then q=true script.Parent.Parent.main.Visible = false script.Parent.Text = "+" else q=false script.Parent.Parent.main.Visible = true script.Parent.Text = "-" end end)
  151. end
  152. coroutine.wrap(GDVRJ_fake_script)()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement