Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local movesAndMons = {}
- local movesToIndex = {}
- local movesPathway = game.StarterGui.SkillsGui.WeaponsController
- local function registerWeapons(monName, weaponsFolder)
- for i, Weapon in ipairs(weaponsFolder:GetChildren()) do
- local name = Weapon.Value
- if not movesPathway.ClientModules:FindFirstChild(name) or not movesPathway.ServerModules:FindFirstChild(name) then
- if movesToIndex[name]==nil then table.insert(movesAndMons, {name}) movesToIndex[name]=#movesAndMons end
- table.insert(movesAndMons[movesToIndex[name]], monName)
- end
- end
- end
- local function iterateThroughMons(target)
- for i, Child in ipairs(target:GetChildren()) do
- if Child.Name == "Weapons" then
- registerWeapons(target.Name, Child)
- elseif Child:IsA("Folder") and Child.Name~="SetStatsOnSpawn" then
- iterateThroughMons(Child)
- end
- end
- end
- for i, Region in ipairs(game.StarterGui.GameGui.LocalScript.Pokemon:GetChildren()) do
- for j, EvoLine in ipairs(Region:GetChildren()) do
- iterateThroughMons(EvoLine)
- end
- end
- table.sort(movesAndMons, function(a,b) if #a==#b then return a[1]<b[1] else return #a>#b end end)
- local bigStringToPrint = ""
- for i, Table in ipairs(movesAndMons) do
- local listString = Table[1].." ("
- table.remove(Table, 1)
- for i, Mon in ipairs(Table) do listString = listString..Mon..", " end
- bigStringToPrint = bigStringToPrint..string.sub(listString, 1, string.len(listString)-2)..")\n"
- end
- print(bigStringToPrint)
- print("All done!!!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement