Advertisement
MegumuSenpai

Case Clicker 2 | Auto Collect

Mar 14th, 2020
8,448
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.00 KB | None | 0 0
  1. -- Variable
  2. local player = game.Players.LocalPlayer
  3.  
  4. -- Network
  5. loadstring(game:HttpGetAsync("https://pastebin.com/raw/pcUnrSHM"))()
  6.  
  7. --UI Library
  8. local library = loadstring(game:HttpGet("https://pastebin.com/raw/eWKgbdix", true))()
  9. local w = library:CreateWindow('clickr hero 2!!')
  10. w:Section('Made by Megumu')
  11. w:Toggle('Auto Collect', {flag = "collect"})
  12. w:Section('Settings')
  13. w:Dropdown("locations", {
  14. location = _G;
  15. flag = "motion";
  16. list = {
  17. "Walk";
  18. "Teleport";
  19. }
  20. }, function()
  21. print(_G.motion)
  22. end)
  23. w:Toggle('Gems',{flag="Gems"})
  24. w:Toggle('Bux',{flag="Bux"})
  25. w:Toggle('Supply Drop',{flag="SupplyDrop"})
  26.  
  27. -- Synapse X Fix
  28. if syn and syn.run_secure_function then
  29. syn.set_thread_identity(2);
  30. end
  31.  
  32. -- Get Nearest
  33. function nearest()
  34. local Closest
  35. local Distance = math.huge
  36. local shit = workspace.Currency:GetChildren()
  37. for i = 1, #shit do local v = shit[i]
  38. if w.flags[v.Name] and pcall(function() return v.Clicks,v.Needed end) and v.Clicks.Value<v.Needed.Value then
  39. local newDistance = player:DistanceFromCharacter(v.Position)
  40. if newDistance < Distance then
  41. Closest = v
  42. Distance = newDistance
  43. end
  44. end
  45. end
  46. return Closest
  47. end
  48.  
  49. -- Get Shit
  50. while true do
  51. if w.flags.collect then
  52. repeat
  53. local thing = nearest()
  54. if thing then
  55. if _G.motion == "Walk" then
  56. player.Character.Humanoid:MoveTo(thing.Position)
  57. player.Character.Humanoid.Sit = false
  58. network:send("ClickCurrency",thing)
  59. else
  60. player.Character.HumanoidRootPart.CFrame=thing.CFrame+Vector3.new(0,3,0)
  61. player.Character.Humanoid.Sit = false
  62. network:send("ClickCurrency",thing)
  63. end
  64. end
  65. wait(.1)
  66. until not w.flags.collect
  67. end
  68. wait(.25)
  69. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement