Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- repeat task.wait() until game:IsLoaded()
- game.Players.LocalPlayer.Idled:Connect(function()
- game:GetService("VirtualUser"):Button2Down(Vector2.new(0, 0), workspace.CurrentCamera.CFrame)
- wait(1)
- game:GetService("VirtualUser"):Button2Up(Vector2.new(0, 0), workspace.CurrentCamera.CFrame)
- end)
- UserSettings().GameSettings.MasterVolume = 0
- game:GetService("RunService"):Set3dRenderingEnabled(Settings.Autofarm.Rendering)
- setfpscap(Settings.Autofarm.FPSCap)
- local Blacklist = {"Cash", "Damageables", "Characters", "AntiPvpArea", "Debris"}
- for Index, Folder in ipairs(game.Workspace:GetChildren()) do
- if not Folder:IsA("Terrain") then
- if Folder:IsA("Folder") and not table.find(Blacklist, Folder.Name) then
- Folder:Destroy()
- elseif Folder:IsA("BasePart") or Folder:IsA("Model") then
- Folder:Destroy()
- end
- end
- end
- local AntiPvpAreas = game.Workspace:WaitForChild("AntiPvpArea"):GetChildren()
- local function CanPvp(Part)
- for Index, Area in AntiPvpAreas do
- if table.find(game.Workspace:GetPartsInPart(Area), Part) then
- return false
- else
- return true
- end
- end
- end
- local function GetRegister()
- for Index, Register in ipairs(workspace.Damageables:GetChildren()) do
- if Register.Name == "ATM" or Register.Name == "CashRegister" and CanPvp(Register:FindFirstChild("Screen")) == true then
- if Register:FindFirstChild("Damageable").Value > 0 then
- return Register
- end
- end
- end
- return nil
- end
- local function GetCashNearby()
- local Cash = {}
- for Index, CashPart in ipairs(workspace.Cash:GetChildren()) do
- if CashPart.Name == "Cash" then
- table.insert(Cash, CashPart)
- end
- end
- return Cash
- end
- while task.wait() do
- pcall(function()
- local Register = GetRegister()
- if Register then
- repeat
- task.wait()
- if game.Players.LocalPlayer.Character:GetAttribute("PVP_ENABLED") == false then
- game:GetService("ReplicatedStorage"):WaitForChild("Modules"):WaitForChild("Net"):WaitForChild("RE/ChangePVP"):FireServer()
- elseif game.Players.LocalPlayer.Character:GetAttribute("PVP_ENABLED") == true then
- game:GetService("ReplicatedStorage"):WaitForChild("PUNCHEVENT"):FireServer(1)
- end
- game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = Register.Screen.CFrame * CFrame.new(0, 0, 3)
- game.Players.LocalPlayer.Character.HumanoidRootPart.Velocity = Vector3.new(0, 0, 0)
- until Register:FindFirstChild("Damageable").Value <= 0
- local CashOnGround = GetCashNearby()
- repeat
- task.wait()
- for Index, Cash in pairs(CashOnGround) do
- repeat
- task.wait()
- game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(Cash.Position - Vector3.new(0, 6, 0))
- game.Players.LocalPlayer.Character.HumanoidRootPart.Velocity = Vector3.new(0, 0, 0)
- if Cash:FindFirstChild("ProximityPrompt") then
- fireproximityprompt(Cash.ProximityPrompt)
- end
- until Cash.Parent == nil
- end
- CashOnGround = GetCashNearby()
- until CashOnGround == nil or #CashOnGround == 0
- else
- game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(0, 500, 0)
- end
- end)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement