Advertisement
danielbratreit

OP Pet Simulator 2 AutoFarm

Mar 13th, 2020
1,334
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.23 KB | None | 0 0
  1. --OP pet simulator 2 autofarm script
  2. --subscribe to AXOMAN GAMING on youtube
  3. --https://www.youtube.com/channel/UC-XM35-xRg75syX2-0lL7vQ?view_as=subscriber
  4. local settings = {
  5.     ["Coin Farm"] = {
  6.         ["Enabled"] = true;
  7.         ["MinHP"] = 10000; -- Min hp of the coins
  8.         ["MaxHP"] = 9e+18; -- Max hp of the coins
  9.     }
  10. }
  11.  
  12. game.Workspace['__THINGS'].Drops.ChildAdded:Connect(function()
  13. for i , v in pairs(game.Workspace['__THINGS'].Drops:GetChildren()) do
  14. for r = 0 , 8 , 1 do
  15. local oh1 = { {v.Name, "id"..r }, { false, false } }
  16. game:GetService("Workspace")["__THINGS"]["__REMOTES"]["take drop"]:FireServer(oh1)
  17. end
  18. end
  19. end)
  20. while true do
  21.     wait()
  22. for num,coin in pairs(game.workspace['__THINGS'].Coins:GetChildren()) do
  23.     local a = {}
  24.     if coin:FindFirstChild("Settings") ~= nil and coin.Settings.Health.Value <= settings["Coin Farm"]["MaxHP"] and coin.Settings.Health.Value >= settings["Coin Farm"]["MinHP"] then
  25.         game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = coin.POS.CFrame + Vector3.new(0,9e+4,0)
  26.         game.Players.LocalPlayer.Character.Humanoid:ChangeState(11)
  27.         for i , c in pairs(game.Players.LocalPlayer.PlayerGui.Inventory.Frame.Container.Holder.Pets:GetChildren()) do
  28.             if c:FindFirstChild("Equipped") ~= nil and c.Equipped.Visible == true then
  29.                 table.insert(a,c.Name)
  30.                 workspace.__THINGS.__REMOTES:FindFirstChild"join coin":InvokeServer({{coin.Name,c.Name},{false,false}})
  31.                    workspace.__THINGS.__REMOTES:FindFirstChild"change pet target":FireServer({{c.Name,"Coin",coin.Name},{false,false,false}})
  32.                 for i = 0 , 50, 1 do
  33.                     workspace.__THINGS.__REMOTES:FindFirstChild"farm coin":FireServer({{coin.Name,c.Name},{false,false}})
  34.             end;end
  35.         end
  36.         repeat
  37.             wait()
  38.             for i , c in pairs(a) do
  39.                 workspace.__THINGS.__REMOTES:FindFirstChild"farm coin":FireServer({{coin.Name,c},{false,false}})
  40.             end
  41.             game.Players.LocalPlayer.Character.Humanoid:ChangeState(11)
  42.         until game.workspace['__THINGS'].Coins:FindFirstChild(coin.Name) == nil or game.Players.LocalPlayer.Character == nil or coin == nil
  43.     end
  44. end
  45. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement