Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- -----------------------------
- Controls:
- f3 to turn on
- f4 to stop
- -----------------------------
- Game:
- https://www.roblox.com/games/1599679393/New-Area-Pet-Simulator
- -----------------------------
- Description:
- Farms coins and xp for your pets, Make sure you adjust the amount accordingly
- -----------------------------
- Credit:
- Edit: @Verm brianops16
- Original: @Verm sunrise
- -----------------------------
- --]]
- function code()
- --Not created by brianops16 !!!!!!!!!!!
- local amount = 200 -- experiment with this value, 1000 is maximum and for pets with high levels
- local coins = game.Workspace:WaitForChild("__REMOTES"):WaitForChild("Coins")
- local save = game.Workspace:WaitForChild("__REMOTES"):WaitForChild("Get Other Stats"):InvokeServer()
- local plr = game:GetService("Players").LocalPlayer
- local petids = {}
- local pets = game:GetService("Workspace")["__REMOTES"].Pets
- local a = #save[plr.Name]["Save"]["Pets"]
- local done = "lol meme"
- function random(t)
- local keys = {}
- for key, value in pairs(t) do
- keys[#keys+1] = key
- end
- index = keys[math.random(1, #keys)]
- return t[index]
- end
- for i=1,a do
- if(save[plr.Name]["Save"]["Pets"][a].e == true) and on == 1 then
- table.insert(petids, save[plr.Name]["Save"]["Pets"][a].id)
- end
- a = a - 1
- end
- function co(b)
- local done = b
- print("Mining coin: " .. b.Name)
- while(b:FindFirstChild"Health" ~= nil and b:FindFirstChild"Health".Value > 0) and on == 1 do
- warn(b.Name .. "- Health: " .. b.Health.Value)
- wait(0.2)
- coins:FireServer("Mine",b.Name, amount, random(petids))
- end
- end
- for _,b in next, workspace.__THINGS.Coins:GetChildren() do
- if(done ~= b) and on == 1 then
- coroutine.wrap(function()co(b)end)()
- end
- end
- end
- ----
- on = 1
- ----
- local UIS = game:GetService("UserInputService")
- UIS.InputBegan:connect(function(Input)
- local KeyCode = Input.KeyCode
- if KeyCode == Enum.KeyCode.F3 then
- on = 1
- wait(.2)
- if on == 1 then
- game:GetService('RunService').Stepped:wait(0)
- local good,bad = pcall(code)
- if good and on == 1 then
- code()
- else
- wait()
- end
- end
- end
- end)
- UIS.InputBegan:connect(function(Input)
- local KeyCode = Input.KeyCode
- if KeyCode == Enum.KeyCode.F4 then
- on = 0
- end
- end)
- --Description and controls at the top
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement