Advertisement
james1234567890000

e

Jan 30th, 2022
1,180
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 4.26 KB | None | 0 0
  1. getgenv().Enabled = true --Overall Toggle
  2. getgenv().World = "Tech" --World eg: Fantasy, Tech
  3. getgenv().Area =  "Alien Forest" --Area eg: Alien Forest, Alien Lab
  4. getgenv().TargetMode = false --Target Mode Toggle
  5. getgenv().TargetType = "Diamonds" --Item to target Coins, Diamonds, Candy, Crate
  6.  
  7.  
  8. local PetsEquipped = {}
  9.  
  10. function CollectOrbs()
  11.     for _, v in next, game:GetService("Workspace")["__THINGS"].Orbs:GetChildren() do
  12.         local args = {[1] = {[1] = {[1] = v.Name}}}
  13.  
  14.         workspace.__THINGS.__REMOTES:FindFirstChild("claim orbs"):FireServer(unpack(args))
  15.     end
  16. end
  17.  
  18. function GetPetsEquipped()
  19.     table.clear(PetsEquipped)
  20.     for _,v in pairs(game:GetService("Players").LocalPlayer.PlayerGui.Inventory.Frame.Main.Pets:GetChildren()) do
  21.         if v.ClassName == "TextButton" and v.BackgroundColor3 == Color3.fromRGB(69, 239, 69) then
  22.             insert = true
  23.             for _,v2 in pairs(PetsEquipped) do if v2 == v.Name then insert = false end end
  24.             if insert then table.insert(PetsEquipped, v.Name) end
  25.         end
  26.     end
  27. end
  28.  
  29. function CollectBags()
  30.     for i,v in pairs(game:GetService("Workspace")["__THINGS"].Lootbags:GetChildren()) do
  31.         v.CFrame = game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.CFrame
  32.     end
  33. end
  34.  
  35. function FarmCoins()
  36.     local Event = game.workspace['__THINGS']['__REMOTES']["get coins"]:InvokeServer({})[1]
  37.     for i,v in next, Event do
  38.         if v.w == getgenv().World and string.find(v.a, getgenv().Area) then
  39.                 local pets = PetsEquipped[math.random(1, #PetsEquipped)]
  40.                 local args = {
  41.                     [1] = {
  42.                         [1] = i, --Coin Id
  43.                         [2] = {
  44.                             [1] = pets --Pet Id?
  45.                         }
  46.                     }
  47.                 }
  48.                    
  49.                 workspace.__THINGS.__REMOTES:FindFirstChild("join coin"):InvokeServer(unpack(args))
  50.                 local args2 = {
  51.                     [1] = {
  52.                         [1] = pets,
  53.                         [2] = "Coin",
  54.                         [3] = i
  55.                     }
  56.                 }
  57.  
  58.                 workspace.__THINGS.__REMOTES:FindFirstChild("change pet target"):FireServer(unpack(args2))
  59.                 local args3 = {
  60.                     [1] = {
  61.                         [1] = i,
  62.                         [2] = pets
  63.                     }
  64.                 }
  65.  
  66.                 workspace.__THINGS.__REMOTES:FindFirstChild("farm coin"):FireServer(unpack(args3))
  67.                 CollectOrbs()
  68.                 CollectBags()
  69.         end
  70.     end
  71. end
  72.  
  73. function TargetFarmCoins()
  74.     GetPetsEquipped()
  75.     CollectOrbs()
  76.     local Event = game.workspace['__THINGS']['__REMOTES']["get coins"]:InvokeServer({})[1]
  77.     for i,v in next, Event do
  78.         if v.w == getgenv().World and string.find(v.a, getgenv().Area) and string.find(v.n, getgenv().TargetType) then
  79.                 local pets = PetsEquipped[math.random(1, #PetsEquipped)]
  80.                 local args = {
  81.                     [1] = {
  82.                         [1] = i, --Coin Id
  83.                         [2] = {
  84.                             [1] = pets --Pet Id?
  85.                         }
  86.                     }
  87.                 }
  88.                    
  89.                 workspace.__THINGS.__REMOTES:FindFirstChild("join coin"):InvokeServer(unpack(args))
  90.                 local args2 = {
  91.                     [1] = {
  92.                         [1] = pets,
  93.                         [2] = "Coin",
  94.                         [3] = i
  95.                     }
  96.                 }
  97.  
  98.                 workspace.__THINGS.__REMOTES:FindFirstChild("change pet target"):FireServer(unpack(args2))
  99.                 local args3 = {
  100.                     [1] = {
  101.                         [1] = i,
  102.                         [2] = pets
  103.                     }
  104.                 }
  105.  
  106.                 workspace.__THINGS.__REMOTES:FindFirstChild("farm coin"):FireServer(unpack(args3))
  107.                 CollectOrbs()
  108.                 CollectBags()
  109.         end
  110.     end
  111. end
  112.  
  113. while getgenv().Enabled == true do wait()
  114.     if getgenv().TargetMode == false then
  115.             GetPetsEquipped()
  116.             FarmCoins()
  117.         else
  118.             GetPetsEquipped()
  119.             TargetFarmCoins()
  120.     end
  121. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement