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 types = {"None", "Normal", "Fire", "Water", "Electric", "Grass", "Ice", "Fighting", "Poison", "Ground", "Flying", "Psychic", "Bug", "Rock", "Ghost", "Dragon", "Dark", "Steel", "Fairy"}
- local function recordMonData(target)
- bigStringToPrint = bigStringToPrint..target.Name.."\t"..(target.Health.Value+200).."\t"..target.Speed.Value.."\t"..target.JumpPower.Value.."\t"
- local weaponsFolder = target:FindFirstChild("Weapons")
- if weaponsFolder.Parent == target then
- local weapons = weaponsFolder:GetChildren()
- for i = 1, 4 do
- if i<=#weapons then
- bigStringToPrint = bigStringToPrint..weapons[i].Value.."\t"
- else
- bigStringToPrint = bigStringToPrint.."\t"
- end
- end
- end
- --[[ types; place the double bracket around this part to avoid it ]]
- if target.SetStatsOnSpawn:FindFirstChild("Type") then
- bigStringToPrint = bigStringToPrint.."\t"..types[target.SetStatsOnSpawn.Type.Value+1].."\t"
- else
- bigStringToPrint = bigStringToPrint.."\tNone\t"
- end
- if target.SetStatsOnSpawn:FindFirstChild("Type2") then
- bigStringToPrint = bigStringToPrint..types[target.SetStatsOnSpawn.Type2.Value+1]
- else
- bigStringToPrint = bigStringToPrint.."None"
- end
- if target:FindFirstChild("MegaEvolution") and target:FindFirstChild("MegaEvolution").Parent == target then
- bigStringToPrint = bigStringToPrint.."\tMEGAEVO"
- end
- bigStringToPrint = bigStringToPrint.."\n"
- end
- local function iterateThroughMons(target)
- local verification = target:FindFirstChild("Health")
- if verification and verification.Parent == target then
- recordMonData(target)
- 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 ]]
- local UnlistedRegions = {}
- for i, RegionRef in ipairs(pokemons:GetChildren()) do
- if RegionRef.Name ~= "Sorter" and not AllTheWorldsCreatures[RegionRef.Name] then
- table.insert(UnlistedRegions, RegionRef)
- end
- end
- for i, RegionRef in ipairs(pokemons:GetChildren()) do
- if RegionRef.Name ~= "Sorter" then
- local MonsTable = AllTheWorldsCreatures[RegionRef.Name]
- if MonsTable then
- local seenSpecies = {}
- local hasSeenUnlisted = false
- for j, EvoLine in ipairs(MonsTable) do
- seenSpecies[EvoLine] = true
- iterateThroughMons(RegionRef[EvoLine])
- end
- for j, UnlistedEvoLine in ipairs(RegionRef:GetChildren()) do
- if not seenSpecies[UnlistedEvoLine.Name] then
- if not hasSeenUnlisted then
- hasSeenUnlisted = true
- bigStringToPrint = bigStringToPrint.."UNLISTED (excluded from Sorter):\n"
- end
- iterateThroughMons(UnlistedEvoLine)
- end
- end
- bigStringToPrint = bigStringToPrint.."\n"
- end
- end
- end
- if #UnlistedRegions>0 then
- bigStringToPrint = bigStringToPrint.."\n\n\nUNLISTED REGIONS\n\n"
- for i, RegionRef in ipairs(UnlistedRegions) do
- for j, EvoLine in ipairs(RegionRef:GetChildren()) do
- iterateThroughMons(EvoLine)
- end
- bigStringToPrint = bigStringToPrint.."\n"
- end
- end
- print(bigStringToPrint)
- print("All done!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement