Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local monsAndData = {}
- local bigStringToPrint = ""
- local pokemons = game.StarterGui.GameGui.LocalScript.Pokemon
- local function iterateThroughMons(target)
- local verification = target:FindFirstChild("Health")
- if verification and verification.Parent == target then
- if not (target:FindFirstChild("MegaEvolution") and target:FindFirstChild("MegaEvolution").Parent == target) then
- bigStringToPrint = bigStringToPrint.." \""..string.lower(target.Name).."\": \""..target.Name.."\",\n"
- end
- for i, Child in ipairs(target:GetChildren()) do
- if Child:IsA("Folder") and Child.Name ~= "SetStatsOnSpawn" and Child.Name ~= "Weapons" then
- if Child.Name == "Evolves" then
- for j, Evolution in ipairs(Child:GetChildren()) do
- iterateThroughMons(Evolution)
- end
- else
- iterateThroughMons(Child)
- end
- end
- end
- end
- end
- local AllTheWorldsCreatures = require(pokemons.Sorter) --[[ add www stage 5 ]]
- for i, RegionRef in ipairs(pokemons:GetChildren()) do
- if RegionRef.Name ~= "Sorter" then
- local MonsTable = AllTheWorldsCreatures[RegionRef.Name]
- if MonsTable then
- for j, EvoLine in ipairs(MonsTable) do
- iterateThroughMons(RegionRef[EvoLine])
- end
- end
- end
- end
- print(bigStringToPrint)
- print("All done!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement