Advertisement
1_F0

Pet Sim X EGG OPENER | Updated 2021

Nov 20th, 2021
8,084
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1. function HatchEgg(Pet)
  2. local pet = Pet
  3. for i,v in pairs(game.ReplicatedStorage.Game.Pets:GetChildren()) do
  4. if string.split(tostring(v), ' - ')[2] == pet then
  5. pet = string.split(tostring(v), ' - ')[1]
  6. end
  7. end
  8. local tbl = {
  9. {
  10. nk = 'Preston',
  11. idt = '69',
  12. e = false,
  13. uid = '69',
  14. s = 999999999999,
  15. id = pet,
  16. }}
  17. local egg
  18. for i_,script in pairs(game.ReplicatedStorage.Game.Eggs:GetDescendants()) do
  19. if script:IsA('ModuleScript') then
  20. if typeof(require(script).drops) == 'table' then
  21. for i,v in pairs(require(script).drops) do
  22. if v[1] == pet then
  23. egg = require(script).displayName
  24. end
  25. end
  26. end
  27. end
  28. end
  29. if Pet == 'Huge Cat' then egg = 'Cracked Egg' end
  30. for i,v in pairs(getgc(true)) do
  31. if (typeof(v) == 'table' and rawget(v, 'OpenEgg')) then
  32. v.OpenEgg(egg, tbl)
  33. end
  34. end
  35. end
  36.  
  37. HatchEgg('Huge Pumpkin Cat')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement