Advertisement
ToxicWHOMakesGUIS

Autofarm

May 21st, 2019
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.62 KB | None | 0 0
  1.  
  2. -- // Variables: // --
  3.  
  4. local LevelList = {}
  5. local UnlockedStages = 0
  6. local Root = game.Players.LocalPlayer.Character.HumanoidRootPart
  7.  
  8. local Farm = Instance.new("Folder",game.Workspace)
  9. Farm.Name = "Autofarm"
  10.  
  11.  
  12. -- // Grab the levels you can autofarm. // --
  13.  
  14. for i,v in pairs(game.Workspace.Areas:GetChildren()) do
  15. if v:IsA("Folder") then
  16. local Area = game.Workspace.BaseAreas[v.Name]
  17.  
  18. local Stat = game.Players.LocalPlayer.leaderstats.Level
  19.  
  20. local LevelNeeded = Area.Level
  21.  
  22. if Stat.Value >= LevelNeeded.Value then
  23. table.insert(LevelList, i, v.Name)
  24. end
  25. end
  26. end
  27.  
  28.  
  29. -- // Checks unlocked stages: // --
  30.  
  31. for i,v in pairs(LevelList) do
  32. UnlockedStages = UnlockedStages + 1
  33. end
  34.  
  35. -- // Equips your launcher: // --
  36.  
  37. if game.Players.LocalPlayer.Backpack:FindFirstChild("Launcher") then
  38. game.Players.LocalPlayer.Backpack.Launcher.Parent = game.Players.LocalPlayer.Character
  39. end
  40.  
  41. -- // Makes your weapon not have a cooldown. // --
  42.  
  43. local Stats = require(game.Players.LocalPlayer.Character.Launcher.Stats)
  44.  
  45. Stats.Cooldown = 0
  46.  
  47. -- // Autofarm: // --
  48.  
  49.  
  50. local Start = function(level)
  51. warn(level)
  52. local Level = game.Workspace.Areas[level]
  53.  
  54. local success, errormessage = pcall(function()
  55. for i,v in pairs(Level:GetDescendants()) do
  56. if v:IsA("BasePart") then
  57. if game.Workspace:FindFirstChild("Autofarm") then
  58. wait(0.01)
  59. Root.CFrame = CFrame.new(v.Position)
  60. Root.Orientation = Vector3.new(v.Orientation)
  61. mouse1click()
  62. else
  63. warn("disabled.")
  64. end
  65. end
  66. end
  67. end)
  68. end
  69.  
  70. for i,v in pairs(LevelList) do
  71. Start(v)
  72. wait(15)
  73. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement