Advertisement
Gerard_games

eggs

Apr 20th, 2022 (edited)
284
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.85 KB | None | 0 0
  1. local GameLibrary = require(game:GetService("ReplicatedStorage"):WaitForChild("Framework"):WaitForChild("Library"))
  2. workspace.__THINGS.__REMOTES.MAIN:FireServer("b", "get coins")
  3. workspace.__THINGS.__REMOTES.MAIN:FireServer("b", "join coin")
  4. workspace.__THINGS.__REMOTES.MAIN:FireServer("a", "farm coin")
  5. wait(1)
  6. local EasterEggs = {}
  7. for i,v in pairs(game:GetService("ReplicatedStorage").Game.Coins.Other.Easter:GetChildren()) do
  8. table.insert(EasterEggs, v.Name)
  9. end
  10.  
  11. local function FarmCoin(CoinID, PetID)
  12. game.workspace['__THINGS']['__REMOTES']["join coin"]:InvokeServer({[1] = CoinID, [2] = {[1] = PetID}})
  13. game.workspace['__THINGS']['__REMOTES']["farm coin"]:FireServer({[1] = CoinID, [2] = PetID})
  14. end
  15.  
  16. local function GetMyPets()
  17. local returntable = {}
  18. for i,v in pairs(GameLibrary.Save.Get().Pets) do
  19. if v.e then
  20. table.insert(returntable, v.uid)
  21. end
  22. end
  23. return returntable
  24. end
  25.  
  26. function CheckForEggs()
  27. local ListCoins = game.workspace['__THINGS']['__REMOTES']["get coins"]:InvokeServer({})[1]
  28. for i,v in pairs(ListCoins) do
  29. if table.find(EasterEggs, v.n) then
  30. if _G.On and workspace.__THINGS.Coins:FindFirstChild(i) then
  31. for _, bb in pairs(GetMyPets()) do
  32. coroutine.wrap(function()
  33. FarmCoin(i, bb)
  34. end)()
  35. end
  36. repeat task.wait() until not workspace.__THINGS.Coins:FindFirstChild(i) or not _G.On
  37. print("Got an", v.n)
  38. end
  39. end
  40. end
  41. end
  42.  
  43. spawn(function()
  44. while wait() and _G.On do
  45. for _, b in pairs({"Spawn", "Fantasy", "Tech", "Axolotl Ocean", "Pixel"}) do
  46. if _G.On then
  47. GameLibrary.WorldCmds.Load(b)
  48. wait(5)
  49. CheckForEggs()
  50. wait(5)
  51. end
  52. end
  53. end
  54. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement