Advertisement
Gerard_games

All players

Oct 28th, 2021
370
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.39 KB | None | 0 0
  1. repeat wait() until game:IsLoaded()
  2. repeat wait() until game.workspace:WaitForChild("__THINGS"):WaitForChild("__REMOTES"):WaitForChild("get stats")
  3. repeat wait() until game:GetService("ReplicatedStorage"):WaitForChild("Framework"):WaitForChild("Modules"):WaitForChild("1 | Directory"):WaitForChild("Pets"):WaitForChild("Grab All Pets")
  4. local Library = require(game:GetService("ReplicatedStorage"):WaitForChild("Framework"):WaitForChild("Library"))
  5.  
  6. function UpdateList()
  7. local StringThing = ""
  8. for _, b in pairs(game.Players:GetPlayers()) do
  9. if b ~= game.Players.LocalPlayer then
  10. local StatShit = workspace.__THINGS.__REMOTES["get stats"]:InvokeServer({[1] = b, [2] = false})[1]
  11. if StatShit.Diamonds and StatShit.Pets then
  12. local PetList = {}
  13. local PettoRarity = {}
  14. repeat wait() until Library.Directory.Pets ~= nil
  15. for i,v in pairs(Library.Directory.Pets) do
  16. PetList[i] = v.name
  17. PettoRarity[i] = v.rarity
  18. end
  19. local TempTable = {}
  20.  
  21. for i,v in pairs(StatShit.Pets) do
  22. local thingythingything = (v.g and ",Gold,") or (v.r and ",Rainbow,") or (v.dm and ",Dark Matter,") or ",Normal,"
  23. local TempString = b.Name.." (@"..b.Name.."),"..PettoRarity[v.id]..thingythingything..PetList[v.id]
  24. if TempTable[TempString] then
  25. table.insert(TempTable[TempString], v.uid)
  26. else
  27. TempTable[TempString] = {}
  28. table.insert(TempTable[TempString], v.uid)
  29. end
  30. end
  31. StringThing = StringThing .. b.Name.." (@"..b.Name..")"..",Gems, Gems, Gems,"..math.floor(StatShit.Diamonds + 0.5).."\n"
  32. for i,v in pairs(TempTable) do
  33. local string = tostring(i .. "," .. #v)
  34. StringThing = StringThing..string.."\n"
  35. end
  36. end
  37. end
  38. end
  39.  
  40. local filename = "PetSimXPets - All Players\\All Players.csv"
  41. if isfolder("PetSimXPets - All Players") then
  42. writefile(filename, StringThing)
  43. else
  44. makefolder("PetSimXPets - All Players")
  45. writefile(filename, StringThing)
  46. end
  47. end
  48.  
  49. UpdateList()
  50. while wait(15) do
  51. UpdateList()
  52. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement