Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- AutoFarm credits go to Bo0T#3654 on discord
- _G.AutoFarm = true -- True or False
- _G.SunFlowerFarm = false -- True or False laggy (wouldnt recommend using if u dont need them)
- _G.TPToSafe = true -- True or False
- _G.AutoMove = true -- True or False
- -- Variables
- local MainEvent = game:GetService("ReplicatedStorage").RE
- local MainInvoke = game:GetService("ReplicatedStorage").RF
- local RunService = game:GetService("RunService")
- local plr = game.Players.LocalPlayer
- local hum = plr.Character.Humanoid
- local plrRoot = plr.Character.HumanoidRootPart
- local RightHand = plr.Character.RightHand
- local Shop = workspace:WaitForChild("Map").Pads.Shop
- local counts = 0
- local counts2 = 9999
- local Rebirths = plr:WaitForChild("leaderstats")["🎉 Rebirths"].Value
- local counts3 = 0
- local Upgrade = workspace:WaitForChild("Map").Pads.Upgrades
- local SunFlowers = workspace.rayIgnore:GetChildren()
- -- Functions
- function SunFlowerFarm()
- while _G.SunFlowerFarm do
- for i,v in pairs(SunFlowers) do
- if v.Name == "Sunflower" then
- if v:FindFirstChild("Meshes/sunflower_Cube.002").Size ~= Vector3.new(0.392402, 0.707773, 0.748476) then
- local SunFlower = v
- SunFlower.CFrame = plrRoot.CFrame
- end
- end
- end
- wait(21)
- end
- end
- function BoughtMowers(Mower)
- for i,v in pairs(game.Players.LocalPlayer.PlayerGui.gameUI.shopFrame.scrollingFrame:GetChildren()) do
- if v:IsA("TextButton") and tonumber(v.Name) < math.huge then
- if v:FindFirstChild(Mower) then
- if v.Corner.Text ~= "" then
- return false
- elseif v.Corner.Text == "" then
- return true
- end
- end
- end
- end
- end
- function Move()
- pcall(function()
- wait(1)
- repeat
- wait()
- if _G.AutoMove then
- local oldPos = plrRoot.Position
- part = Instance.new("Part")
- part.Parent = workspace
- part.Position = Vector3.new(plrRoot.Position.X, plrRoot.Position.Y, plrRoot.Position.Z + 20)
- part.Transparency = 1
- part.Anchored = true
- hum:MoveTo(part.Position)
- wait(.1)
- hum:MoveTo(oldPos)
- wait(.1)
- part:Destroy()
- end
- until not _G.AutoFarm
- end)
- end
- function BuyMowers()
- pcall(function()
- while _G.AutoFarm do
- wait(3)
- for i,v in pairs(game:GetService("ReplicatedStorage").Assets.Mowers:GetChildren()) do
- local value = BoughtMowers(v.Name)
- if value == true then
- game:GetService("ReplicatedStorage").RF:InvokeServer("buyOrEquipMower", {v.Name})
- end
- end
- end
- end)
- end
- local function FindTool()
- pcall(function()
- for i,v in pairs(plr.Backpack:GetChildren()) do
- if v:IsA("Tool") then
- v.Parent = plr.Character
- return v
- elseif v.ClassName ~= "Tool" then
- for a,b in pairs(plr.Character:GetChildren()) do
- if b:IsA("Tool") then
- return b
- end
- end
- end
- end
- end)
- end
- function AntiAFK()
- loadstring(game:HttpGet("https://pastebin.com/raw/sDXcYFhR", true))()
- end
- function Autofarm()
- pcall(function()
- if _G.AutoFarm then
- spawn(BuyMowers)
- spawn(Move)
- end
- while _G.AutoFarm do
- RunService.Heartbeat:Wait()
- local tool = FindTool()
- local string = plr.PlayerGui.gameUI.upgradesFrame.rangeFrame.rangeNextTitle.Text
- local index = string.match(string, "%d+")
- local betterIndex = tonumber(index)
- MainEvent:FireServer("grassCollect", {[1] = betterIndex})
- MainEvent:FireServer("sellGrass", {1})
- MainInvoke:InvokeServer("canRebirth", {})
- end
- end)
- end
- safe = Instance.new("Part")
- safe.Position = Vector3.new(plrRoot.Position.X, plrRoot.Position.Y + 1000, plrRoot.Position.Z)
- safe.Size = Vector3.new(99999999999999999999999999, 0.5, 99999999999999999999999999)
- safe.Transparency = 0.8
- safe.Anchored = true
- safe.Name = "Safe"
- safe.CanCollide = true
- safe.Parent = workspace
- if _G.AutoFarm and _G.TPToSafe then
- pcall(function()
- plrRoot.CFrame = CFrame.new(safe.Position.X, safe.Position.Y + 5, safe.Position.Z)
- end)
- end
- function count()
- while _G.AutoFarm do
- wait(1)
- counts2 = counts2 + 1
- counts3 = counts3 + 1
- if counts2 >= 3 then
- game.Players.LocalPlayer.PlayerGui.gameUI.shopFrame.Visible = false
- local oldPos = plrRoot.CFrame
- plrRoot.CFrame = Shop.CFrame
- wait(0.5)
- plrRoot.CFrame = Upgrade.CFrame
- wait(0.5)
- plrRoot.CFrame = CFrame.new(safe.Position.X, safe.Position.Y + 5, safe.Position.Z)
- counts2 = 0
- end
- if counts3 >= 7 then
- MainInvoke:InvokeServer("buyUpgrade", {"bagLevel"})
- MainInvoke:InvokeServer("buyUpgrade", {"rangeLevel"})
- MainInvoke:InvokeServer("buyUpgrade", {"speedLevel"})
- end
- end
- end
- spawn(tool)
- spawn(count)
- spawn(Autofarm)
- spawn(AntiAFK)
- spawn(SunFlowerFarm)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement