Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- getgenv().keybind_autofarm = "g"
- getgenv().autofarm = false
- local plr = game.Players.LocalPlayer
- local remotes = game:GetService("ReplicatedStorage").RemoteEvents
- local plot = nil
- for _,part in pairs(workspace.PlotsFolder:GetDescendants()) do
- if part.Name == "PlayerName" then
- if string.find(part.Text, plr.DisplayName or plr.Name) then
- plot = part.Parent.Parent.Parent.Parent
- end
- end
- end
- plr:GetMouse().KeyDown:Connect(function(key)
- if key:lower() == keybind_autofarm then
- autofarm = not autofarm
- end
- end)
- game:GetService("RunService").Stepped:Connect(function()
- wait()
- pcall(function()
- if autofarm then
- for _,egg in pairs(workspace._EggFolder:GetChildren()) do
- remotes.EggEvent:FireServer({[egg:GetAttribute("ID")] = 1})
- egg:Destroy()
- end
- if tonumber(plr.PlayerGui.MainUI.InfoBar.Sidebar.Eggs.Eggs.Text) > 0 then
- remotes.ProximityPromptEvent:FireServer("AddToMachine")
- end
- for _,part in pairs(plot.BuyPads:GetDescendants()) do
- if autofarm == false then break end
- if part:IsA("BillboardGui") then
- local touch = part.Parent.TouchInterest
- if plr.leaderstats.Coins.Value >= tonumber(part.Cost.Text:split('$')[2]) then
- plr.Character.HumanoidRootPart.CFrame = part.Parent.CFrame
- end
- end
- wait()
- end
- remotes.ProximityPromptEvent:FireServer("Rebirth")
- end
- end)
- end)
- -- Anti Afk --
- local vu = game:GetService("VirtualUser")
- plr.Idled:Connect(function()
- vu:Button2Down(Vector2.new(0,0),workspace.CurrentCamera.CFrame)
- wait(1)
- vu:Button2Up(Vector2.new(0,0),workspace.CurrentCamera.CFrame)
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement