Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- repeat wait() until game:IsLoaded()
- repeat wait() until game.workspace:WaitForChild("__THINGS"):WaitForChild("__REMOTES"):WaitForChild("get stats")
- repeat wait() until game:GetService("ReplicatedStorage"):WaitForChild("Framework"):WaitForChild("Modules"):WaitForChild("1 | Directory"):WaitForChild("Pets"):WaitForChild("Grab All Pets")
- local Library = require(game:GetService("ReplicatedStorage"):WaitForChild("Framework"):WaitForChild("Library"))
- function UpdateList()
- local StringThing = ""
- for _, b in pairs(game.Players:GetPlayers()) do
- if b ~= game.Players.LocalPlayer then
- local StatShit = workspace.__THINGS.__REMOTES["get stats"]:InvokeServer({[1] = b, [2] = false})[1]
- if StatShit.Diamonds and StatShit.Pets then
- local PetList = {}
- local PettoRarity = {}
- repeat wait() until Library.Directory.Pets ~= nil
- for i,v in pairs(Library.Directory.Pets) do
- PetList[i] = v.name
- PettoRarity[i] = v.rarity
- end
- local TempTable = {}
- for i,v in pairs(StatShit.Pets) do
- local thingythingything = (v.g and ",Gold,") or (v.r and ",Rainbow,") or (v.dm and ",Dark Matter,") or ",Normal,"
- local TempString = b.Name.." (@"..b.Name.."),"..PettoRarity[v.id]..thingythingything..PetList[v.id]
- if TempTable[TempString] then
- table.insert(TempTable[TempString], v.uid)
- else
- TempTable[TempString] = {}
- table.insert(TempTable[TempString], v.uid)
- end
- end
- StringThing = StringThing .. b.Name.." (@"..b.Name..")"..",Gems, Gems, Gems,"..math.floor(StatShit.Diamonds + 0.5).."\n"
- for i,v in pairs(TempTable) do
- local string = tostring(i .. "," .. #v)
- StringThing = StringThing..string.."\n"
- end
- end
- end
- end
- local filename = "PetSimXPets - All Players\\All Players.csv"
- if isfolder("PetSimXPets - All Players") then
- writefile(filename, StringThing)
- else
- makefolder("PetSimXPets - All Players")
- writefile(filename, StringThing)
- end
- end
- UpdateList()
- while wait(15) do
- UpdateList()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement