Advertisement
Guest User

Untitled

a guest
Jan 23rd, 2020
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.58 KB | None | 0 0
  1. -- AutoFarm credits go to Bo0T#3654 on discord
  2. _G.AutoFarm = true -- True or False
  3. _G.SunFlowerFarm = false -- True or False laggy (wouldnt recommend using if u dont need them)
  4. _G.TPToSafe = true -- True or False
  5. _G.AutoMove = true -- True or False
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17. -- Variables
  18. local MainEvent = game:GetService("ReplicatedStorage").RE
  19. local MainInvoke = game:GetService("ReplicatedStorage").RF
  20. local RunService = game:GetService("RunService")
  21. local plr = game.Players.LocalPlayer
  22. local hum = plr.Character.Humanoid
  23. local plrRoot = plr.Character.HumanoidRootPart
  24. local RightHand = plr.Character.RightHand
  25. local Shop = workspace:WaitForChild("Map").Pads.Shop
  26. local counts = 0
  27. local counts2 = 9999
  28. local Rebirths = plr:WaitForChild("leaderstats")["🎉 Rebirths"].Value
  29. local counts3 = 0
  30. local Upgrade = workspace:WaitForChild("Map").Pads.Upgrades
  31. local SunFlowers = workspace.rayIgnore:GetChildren()
  32.  
  33. -- Functions
  34.  
  35. function SunFlowerFarm()
  36. while _G.SunFlowerFarm do
  37. for i,v in pairs(SunFlowers) do
  38. if v.Name == "Sunflower" then
  39. if v:FindFirstChild("Meshes/sunflower_Cube.002").Size ~= Vector3.new(0.392402, 0.707773, 0.748476) then
  40. local SunFlower = v
  41. SunFlower.CFrame = plrRoot.CFrame
  42. end
  43. end
  44. end
  45. wait(21)
  46. end
  47. end
  48.  
  49. function BoughtMowers(Mower)
  50. for i,v in pairs(game.Players.LocalPlayer.PlayerGui.gameUI.shopFrame.scrollingFrame:GetChildren()) do
  51. if v:IsA("TextButton") and tonumber(v.Name) < math.huge then
  52. if v:FindFirstChild(Mower) then
  53. if v.Corner.Text ~= "" then
  54. return false
  55. elseif v.Corner.Text == "" then
  56. return true
  57. end
  58. end
  59. end
  60. end
  61. end
  62.  
  63. function Move()
  64. pcall(function()
  65. wait(1)
  66. repeat
  67. wait()
  68. if _G.AutoMove then
  69. local oldPos = plrRoot.Position
  70. part = Instance.new("Part")
  71. part.Parent = workspace
  72. part.Position = Vector3.new(plrRoot.Position.X, plrRoot.Position.Y, plrRoot.Position.Z + 20)
  73. part.Transparency = 1
  74. part.Anchored = true
  75. hum:MoveTo(part.Position)
  76. wait(.1)
  77. hum:MoveTo(oldPos)
  78. wait(.1)
  79. part:Destroy()
  80. end
  81. until not _G.AutoFarm
  82. end)
  83. end
  84.  
  85. function BuyMowers()
  86. pcall(function()
  87. while _G.AutoFarm do
  88. wait(3)
  89. for i,v in pairs(game:GetService("ReplicatedStorage").Assets.Mowers:GetChildren()) do
  90. local value = BoughtMowers(v.Name)
  91. if value == true then
  92. game:GetService("ReplicatedStorage").RF:InvokeServer("buyOrEquipMower", {v.Name})
  93. end
  94. end
  95. end
  96. end)
  97. end
  98.  
  99. local function FindTool()
  100. pcall(function()
  101. for i,v in pairs(plr.Backpack:GetChildren()) do
  102. if v:IsA("Tool") then
  103. v.Parent = plr.Character
  104. return v
  105. elseif v.ClassName ~= "Tool" then
  106. for a,b in pairs(plr.Character:GetChildren()) do
  107. if b:IsA("Tool") then
  108. return b
  109. end
  110. end
  111. end
  112. end
  113. end)
  114. end
  115.  
  116. function AntiAFK()
  117. loadstring(game:HttpGet("https://pastebin.com/raw/sDXcYFhR", true))()
  118. end
  119.  
  120. function Autofarm()
  121. pcall(function()
  122. if _G.AutoFarm then
  123. spawn(BuyMowers)
  124. spawn(Move)
  125. end
  126. while _G.AutoFarm do
  127. RunService.Heartbeat:Wait()
  128. local tool = FindTool()
  129. local string = plr.PlayerGui.gameUI.upgradesFrame.rangeFrame.rangeNextTitle.Text
  130. local index = string.match(string, "%d+")
  131. local betterIndex = tonumber(index)
  132. MainEvent:FireServer("grassCollect", {[1] = betterIndex})
  133. MainEvent:FireServer("sellGrass", {1})
  134. MainInvoke:InvokeServer("canRebirth", {})
  135. end
  136. end)
  137. end
  138.  
  139. safe = Instance.new("Part")
  140. safe.Position = Vector3.new(plrRoot.Position.X, plrRoot.Position.Y + 1000, plrRoot.Position.Z)
  141. safe.Size = Vector3.new(99999999999999999999999999, 0.5, 99999999999999999999999999)
  142. safe.Transparency = 0.8
  143. safe.Anchored = true
  144. safe.Name = "Safe"
  145. safe.CanCollide = true
  146. safe.Parent = workspace
  147.  
  148. if _G.AutoFarm and _G.TPToSafe then
  149. pcall(function()
  150. plrRoot.CFrame = CFrame.new(safe.Position.X, safe.Position.Y + 5, safe.Position.Z)
  151. end)
  152. end
  153.  
  154. function count()
  155. while _G.AutoFarm do
  156. wait(1)
  157. counts2 = counts2 + 1
  158. counts3 = counts3 + 1
  159. if counts2 >= 3 then
  160. game.Players.LocalPlayer.PlayerGui.gameUI.shopFrame.Visible = false
  161. local oldPos = plrRoot.CFrame
  162. plrRoot.CFrame = Shop.CFrame
  163. wait(0.5)
  164. plrRoot.CFrame = Upgrade.CFrame
  165. wait(0.5)
  166. plrRoot.CFrame = CFrame.new(safe.Position.X, safe.Position.Y + 5, safe.Position.Z)
  167. counts2 = 0
  168. end
  169. if counts3 >= 7 then
  170. MainInvoke:InvokeServer("buyUpgrade", {"bagLevel"})
  171. MainInvoke:InvokeServer("buyUpgrade", {"rangeLevel"})
  172. MainInvoke:InvokeServer("buyUpgrade", {"speedLevel"})
  173. end
  174. end
  175. end
  176.  
  177.  
  178. spawn(tool)
  179. spawn(count)
  180. spawn(Autofarm)
  181. spawn(AntiAFK)
  182. spawn(SunFlowerFarm)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement