Advertisement
Guest User

Untitled

a guest
Sep 15th, 2019
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.34 KB | None | 0 0
  1. plr = game.Players.LocalPlayer
  2. mouse = plr:GetMouse()
  3. p = Instance.new('Folder', plr.PlayerGui.QBox)
  4.  
  5. tl = Instance.new('TextLabel', plr.PlayerGui.QBox)
  6. tl.BackgroundTransparency = 1
  7. tl.TextColor3 = Color3.new(1, 1, 1)
  8. tl.TextScaled = true
  9. tl.Font = 'SourceSansBold'
  10. tl.Size = UDim2.new(0, 200, 0, 50)
  11. tl.Position = UDim2.new(0, 900, 0, 0)
  12. tl.TextStrokeTransparency = 0
  13. tl.TextStrokeColor3 = Color3.new(0, 0, 0)
  14. tl.Visible = false
  15.  
  16. on = true
  17.  
  18. mouse.KeyDown:connect(function(key)
  19. if key == 'r' then
  20. local h = Instance.new('Hint', game.Workspace)
  21. p:ClearAllChildren()
  22. on = true
  23. h.Text = 'Finding Finish'
  24. wait(1)
  25. for i,v in pairs (game.Workspace:GetChildren()) do
  26. if v:FindFirstChild('MapFinish') then
  27. h.Text = 'Finish Found'
  28. local l = Instance.new('BoxHandleAdornment', p)
  29. l.Size = v.MapFinish.Size
  30. l.AlwaysOnTop = true
  31. l.Transparency = .5
  32. l.ZIndex = 10
  33. l.Color3 = Color3.new(255, 0, 0)
  34. l.Adornee = v.MapFinish
  35. wait(2)
  36. h:Destroy()
  37. else
  38. if v:FindFirstChild('Creator') and v:FindFirstChild('Model') then
  39. print(true)
  40. if v.Model:FindFirstChild('MapFinish') then
  41. h.Text = 'Finish Found'
  42. local l = Instance.new('BoxHandleAdornment', p)
  43. l.Size = v.Model.MapFinish.Size
  44. l.AlwaysOnTop = true
  45. l.Transparency = .5
  46. l.ZIndex = 10
  47. l.Color3 = Color3.new(255, 0, 0)
  48. l.Adornee = v.Model.MapFinish
  49. wait(2)
  50. h:Destroy()
  51.  
  52. while wait() do
  53. local x1 = game.Players.LocalPlayer.Character.HumanoidRootPart.Position.X
  54. local y1 = game.Players.LocalPlayer.Character.HumanoidRootPart.Position.Y
  55. local z1 = game.Players.LocalPlayer.Character.HumanoidRootPart.Position.Z
  56.  
  57. local x2 = v.Model.MapFinish.Position.X
  58. local y2 = v.Model.MapFinish.Position.Y
  59. local z2 = v.Model.MapFinish.Position.Z
  60.  
  61. local d = math.sqrt(math.pow(x2 - x1, 2) + math.pow(y2 - y1, 2) + math.pow(z2 - z1, 2))
  62.  
  63. tl.Text = 'Dist: '..math.ceil(d)
  64. tl.Visible = true
  65. end
  66. end
  67. end
  68. end
  69. end
  70. elseif key == 't' then
  71. if #p:GetChildren() ~= 0 then
  72. local h = Instance.new('Hint', game.Workspace)
  73. h.Text = 'toggled, visible: '..not on
  74. for i,v in pairs (p:GetChildren()) do
  75. v.Visible = not on
  76. on = not on
  77. end
  78. end
  79. end
  80. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement