Advertisement
IHATEMICROWAVEOVEN

prints all mons

Oct 27th, 2023
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.46 KB | None | 0 0
  1. local monsAndData = {}
  2. local bigStringToPrint = ""
  3. local pokemons = game.StarterGui.GameGui.LocalScript.Pokemon
  4.  
  5. local function iterateThroughMons(target)
  6. local verification = target:FindFirstChild("Health")
  7. if verification and verification.Parent == target then
  8. if not (target:FindFirstChild("MegaEvolution") and target:FindFirstChild("MegaEvolution").Parent == target) then
  9. bigStringToPrint = bigStringToPrint.." \""..string.lower(target.Name).."\": \""..target.Name.."\",\n"
  10. end
  11. for i, Child in ipairs(target:GetChildren()) do
  12. if Child:IsA("Folder") and Child.Name ~= "SetStatsOnSpawn" and Child.Name ~= "Weapons" then
  13. if Child.Name == "Evolves" then
  14. for j, Evolution in ipairs(Child:GetChildren()) do
  15. iterateThroughMons(Evolution)
  16. end
  17. else
  18. iterateThroughMons(Child)
  19. end
  20. end
  21. end
  22. end
  23. end
  24.  
  25. local AllTheWorldsCreatures = require(pokemons.Sorter) --[[ add www stage 5 ]]
  26. for i, RegionRef in ipairs(pokemons:GetChildren()) do
  27. if RegionRef.Name ~= "Sorter" then
  28. local MonsTable = AllTheWorldsCreatures[RegionRef.Name]
  29. if MonsTable then
  30. for j, EvoLine in ipairs(MonsTable) do
  31. iterateThroughMons(RegionRef[EvoLine])
  32. end
  33. end
  34. end
  35. end
  36.  
  37. print(bigStringToPrint)
  38. print("All done!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement