Advertisement
BobMe

Untitled

Jul 19th, 2020
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.52 KB | None | 0 0
  1. -- Made by Memo1332
  2.  
  3. -- Objects
  4.  
  5. local Bill = Instance.new("BillboardGui")
  6. local currentBill = nil
  7. local Frame = Instance.new("Frame")
  8. local TextLabel = Instance.new("TextLabel")
  9.  
  10. -- Properties
  11.  
  12. Bill.Name = "Bill"
  13. Bill.Parent = nil
  14. Bill.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  15. Bill.Active = true
  16. Bill.Size = UDim2.new(0, 40, 0, 40)
  17. Bill.AlwaysOnTop = true
  18.  
  19. Frame.Parent = Bill
  20. Frame.BackgroundColor3 = Color3.new(1, 1, 1)
  21. Frame.BackgroundTransparency = 1
  22. Frame.Size = UDim2.new(1, 0, 1, 0)
  23.  
  24. TextLabel.Parent = Frame
  25. TextLabel.BackgroundColor3 = Color3.new(1, 1, 1)
  26. TextLabel.BackgroundTransparency = 1
  27. TextLabel.Size = UDim2.new(1, 0, 1, 0)
  28. TextLabel.Font = Enum.Font.GothamSemibold
  29. TextLabel.Text = "X"
  30. TextLabel.TextColor3 = Color3.new(1, 0.0117647, 0.952941)
  31. TextLabel.TextSize = 40
  32. TextLabel.TextWrapped = true
  33.  
  34. -- Objects
  35.  
  36. local Track = Instance.new("ScreenGui")
  37. local Frame = Instance.new("Frame")
  38. local Input = Instance.new("TextBox")
  39. local Track_2 = Instance.new("TextLabel")
  40. local Distance = Instance.new("TextLabel")
  41.  
  42. -- Properties
  43.  
  44. Track.Name = "Track"
  45. Track.Parent = game.Players.LocalPlayer.PlayerGui
  46. Track.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  47. Track.ResetOnSpawn = false
  48.  
  49. Frame.Parent = Track
  50. Frame.AnchorPoint = Vector2.new(1, 1)
  51. Frame.BackgroundColor3 = Color3.new(0.968628, 0.00784314, 1)
  52. Frame.BackgroundTransparency = 0.5
  53. Frame.BorderColor3 = Color3.new(1, 0.686275, 0.996078)
  54. Frame.BorderSizePixel = 5
  55. Frame.ClipsDescendants = true
  56. Frame.Position = UDim2.new(1, -10, 1, -10)
  57. Frame.Size = UDim2.new(0.300000012, 0, 0.100000001, 0)
  58. Frame.SizeConstraint = Enum.SizeConstraint.RelativeXX
  59.  
  60. Input.Name = "Input"
  61. Input.Parent = Frame
  62. Input.BackgroundColor3 = Color3.new(1, 1, 1)
  63. Input.BackgroundTransparency = 0.40000000596046
  64. Input.BorderSizePixel = 0
  65. Input.Size = UDim2.new(1, 0, 0.333333343, 0)
  66. Input.Font = Enum.Font.GothamBold
  67. Input.PlaceholderColor3 = Color3.new(0.615686, 0.615686, 0.615686)
  68. Input.Text = ""
  69. Input.TextColor3 = Color3.new(1, 1, 1)
  70. Input.TextSize = 14
  71.  
  72. Track_2.Name = "Track"
  73. Track_2.Parent = Frame
  74. Track_2.BackgroundColor3 = Color3.new(0.427451, 0.427451, 0.427451)
  75. Track_2.BackgroundTransparency = 0.40000000596046
  76. Track_2.BorderSizePixel = 0
  77. Track_2.Position = UDim2.new(0, 0, 0.333333343, 0)
  78. Track_2.Size = UDim2.new(1, 0, 0.333333343, 0)
  79. Track_2.Font = Enum.Font.GothamBold
  80. Track_2.Text = ""
  81. Track_2.TextColor3 = Color3.new(1, 1, 1)
  82. Track_2.TextSize = 14
  83. Track_2.TextWrapped = true
  84.  
  85. Distance.Name = "Distance"
  86. Distance.Parent = Frame
  87. Distance.BackgroundColor3 = Color3.new(0.427451, 0.427451, 0.427451)
  88. Distance.BackgroundTransparency = 0.40000000596046
  89. Distance.BorderSizePixel = 0
  90. Distance.Position = UDim2.new(0, 0, 0.666666687, 0)
  91. Distance.Size = UDim2.new(1, 0, 0.333333343, 0)
  92. Distance.Font = Enum.Font.GothamBold
  93. Distance.Text = ""
  94. Distance.TextColor3 = Color3.new(1, 1, 1)
  95. Distance.TextSize = 14
  96. Distance.TextWrapped = true
  97.  
  98. -- Scripts
  99.  
  100. function round(number)
  101. local kek = nil
  102. local kek2 = nil
  103. local strnum = tostring(number)
  104. for i=1,#strnum do
  105. if string.sub(strnum,i,i) == "." then
  106. kek = tonumber(string.sub(strnum,i+1,i+1))
  107. kek2 = tonumber(string.sub(strnum,1,i-1))
  108. end
  109. end
  110. if kek ~= nil then
  111. if 3 > 3 then
  112. kek2 = kek2 + 1
  113. else
  114. kek2 = kek2
  115. end
  116. end
  117. if kek2 == nil then
  118. return number
  119. end
  120. return tostring(kek2)
  121. end
  122.  
  123. function findplayer(player,target)
  124. local tab = {}
  125. local child = target:GetChildren()
  126. for i=1,#child do
  127. if string.sub(child[i].Name,1,#player):lower() == player:lower() then
  128. print(child[i])
  129. if child[i]:FindFirstChild("Head") ~= nil and child[i]:FindFirstChild("Torso") ~= nil then
  130. return child[i]
  131. end
  132. end
  133. end
  134. end
  135. local homes = {}
  136. function findhome(player)
  137. local tab = {}
  138. local child = homes
  139. local homename
  140. for i,v in pairs(homes) do
  141. --find the string name
  142. local str
  143. for g=1,#v do
  144. if string.sub(v,g,g) == ":" then
  145. str = string.sub(v,1,g-1)
  146. end
  147. end
  148. --test for home
  149. if string.sub(v,1,#player):lower() == player:lower() then
  150. return v
  151. end
  152. end
  153. end
  154.  
  155. local tracked_player = nil
  156. local distance
  157. local player = game.Players.LocalPlayer
  158. local mouse = player:GetMouse()
  159.  
  160. mouse.KeyDown:Connect(function(e)
  161. if string.byte(e) == 39 then
  162. Input:CaptureFocus()
  163. end
  164. end)
  165.  
  166. Input.FocusLost:Connect(function(enter)
  167. if enter == true then
  168. local inp = Input.Text
  169. if string.sub(inp,1,6):lower() == "track/" then
  170. local player = findplayer(string.sub(inp,7),workspace)
  171. if player ~= nil then
  172. Input.Text = ""
  173. tracked_player = player
  174. if currentBill ~= nil then
  175. currentBill:Destroy()
  176. currentBill = Bill:Clone()
  177. currentBill.Parent = player.Torso
  178. else
  179. currentBill = Bill:Clone()
  180. currentBill.Parent = player.Torso
  181. end
  182. end
  183. elseif string.sub(inp,1,3):lower() == "tp/" then
  184. local sub2
  185. local sub3
  186. for i=4,#inp do
  187. if string.sub(inp,i,i) == "/" then
  188. sub2 = i
  189. break
  190. end
  191. end
  192. for i=sub2+1,#inp do
  193. if string.sub(inp,i,i) == "/" then
  194. sub3 = i
  195. break
  196. end
  197. end
  198. local x = tonumber(string.sub(inp,4,sub2-1))
  199. local y = tonumber(string.sub(inp,sub2+1,sub3-1))
  200. local z = tonumber(string.sub(inp,sub3+1))
  201. game.Players.LocalPlayer.Character:MoveTo(Vector3.new(x*3,y*3,z*3))
  202. Input.Text = ""
  203. elseif string.sub(inp,1,8):lower() == "sethome/" then
  204. local homename = string.sub(inp,9)
  205. local pos = game.Players.LocalPlayer.Character.Torso.Position
  206. local home = homename..":"..pos.X.."|"..(pos.Y).."|"..pos.Z
  207. table.insert(homes,home)
  208. Input.Text = ""
  209. elseif string.sub(inp,1,5):lower() == "home/" then
  210. local home = findhome(string.sub(inp,6))
  211. if home == nil then
  212. Input.Text = "NOT A VALID HOME"
  213. return
  214. end
  215. local intsub
  216. for i=1,#home do
  217. if string.sub(home,i,i) == ":" then
  218. intsub = i
  219. break
  220. end
  221. end
  222. local sub2
  223. local sub3
  224. for i=intsub+1,#home do
  225. if string.sub(home,i,i) == "|" then
  226. sub2 = i
  227. break
  228. end
  229. end
  230. for i=sub2+1,#home do
  231. if string.sub(home,i,i) == "|" then
  232. sub3 = i
  233. break
  234. end
  235. end
  236. local x = tonumber(string.sub(home,intsub+1,sub2-1))
  237. local y = tonumber(string.sub(home,sub2+1,sub3-1))
  238. local z = tonumber(string.sub(home,sub3+1))
  239. game.Players.LocalPlayer.Character:MoveTo(Vector3.new(x,y,z))
  240. Input.Text = ""
  241. elseif string.sub(inp,1,10):lower() == "listhomes/" then
  242. local keker = ""
  243. for i=1,#homes do
  244. for k=1,#homes[i] do
  245. if string.sub(homes[i],k,k) == ":" then
  246. if i ~= #homes then
  247. keker = keker..string.sub(homes[i],1,k-1)..", "
  248. else
  249. keker = keker..string.sub(homes[i],1,k-1)
  250. end
  251. end
  252. end
  253. end
  254. Input.Text = keker
  255. end
  256. end
  257. end)
  258.  
  259. game:GetService("RunService").RenderStepped:Connect(function()
  260. if tracked_player ~= nil then
  261. local pos = tracked_player.Head.Position
  262. pos = Vector3.new(round(pos.X/3),round(pos.Y/3),round(pos.Z/3))
  263. Track_2.Text = tracked_player.Name.."'s location : ("..pos.X..", "..pos.Y..", "..pos.Z..")"
  264. local local_pos = game.Players.LocalPlayer.Character.Head.Position
  265. local_pos = Vector3.new(round(local_pos.X/3),round(local_pos.Y/3),round(local_pos.Z/3))
  266. distance = pos-local_pos
  267. distance = Vector3.new(round(distance.X),round(distance.Y),round(distance.Z))
  268. Distance.Text = "Distance from "..tracked_player.Name.." : ("..distance.X..", "..distance.Y..", "..distance.Z..")"
  269. end
  270. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement