Advertisement
Guest User

Untitled

a guest
Oct 22nd, 2019
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.72 KB | None | 0 0
  1. for i,v in pairs(workspace:FindFirstChild("Map"):FindFirstChild("NPCs"):GetChildren()) do
  2. if v:IsA("Model") and v:FindFirstChild("HumanoidRootPart") then
  3. if v.Name == "Boojie" then
  4. local position = Instance.new("Vector3Value", workspace)
  5. position.Name = "FindBoojieNPCESP"
  6. local enableBool = Instance.new("BoolValue", workspace)
  7. enableBool.Name = "FindBoojieNPCToggle"
  8. enableBool.Value = false
  9.  
  10. local UI = Instance.new("ScreenGui", game.Players.LocalPlayer.PlayerGui)
  11. local TextButton = Instance.new("TextButton", UI)
  12. TextButton.Text = "Boojie Collector Toggle "..tostring(enableBool.Value)
  13. TextButton.BackgroundTransparency = 0.8
  14. TextButton.BackgroundColor3 = Color3.fromRGB(38, 38, 38)
  15. TextButton.Font = Enum.Font.Antique
  16. TextButton.TextColor3 = Color3.fromRGB(255,255,255)
  17. TextButton.Size = UDim2.new(0.1,0,0.1,0)
  18. TextButton.Position = UDim2.new(0,0,0.561,0)
  19. TextButton.TextScaled = true
  20.  
  21. TextButton.MouseButton1Click:Connect(function()
  22. if enableBool.Value == false then
  23. enableBool.Value = true
  24. else
  25. enableBool.Value = false
  26. end
  27. end)
  28.  
  29. spawn(function()
  30. enableBool.Changed:Connect(function(changed)
  31. TextButton.Text = "Boojie Collector Toggle "..tostring(enableBool.Value)
  32. if changed == true then
  33. spawn(function()
  34. repeat wait()
  35. position.Value = v.HumanoidRootPart.Position
  36. until enableBool.Value == false
  37. end)
  38. end
  39. end)
  40. end)
  41. position.Changed:Connect(function(changed)
  42. if changed == Vector3.new(0,-30,0) then return end
  43. game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = v.HumanoidRootPart.CFrame * CFrame.new(0,0,-5)
  44. end)
  45. end
  46. end
  47. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement