Advertisement
pa1nx9

Dragon Ball Online Generations AUTO COLLECT

Oct 20th, 2021
555
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.64 KB | None | 0 0
  1. Wait(10)
  2. for i,v in pairs(game.workspace.Map.Grass:GetDescendants()) do
  3. if v:IsA("ClickDetector") then
  4.  
  5. game.Players.LocalPlayer.Character:WaitForChild("HumanoidRootPart").CFrame = v.Parent.CFrame
  6.  
  7. end
  8. end
  9. wait(10)
  10. local PlaceID = game.PlaceId
  11. local AllIDs = {}
  12. local foundAnything = ""
  13. local actualHour = os.date("!*t").hour
  14. local Deleted = false
  15. local File = pcall(function()
  16. AllIDs = game:GetService('HttpService'):JSONDecode(readfile("NotSameServers.json"))
  17. end)
  18. if not File then
  19. table.insert(AllIDs, actualHour)
  20. writefile("NotSameServers.json", game:GetService('HttpService'):JSONEncode(AllIDs))
  21. end
  22. function TPReturner()
  23. local Site;
  24. if foundAnything == "" then
  25. Site = game.HttpService:JSONDecode(game:HttpGet('https://games.roblox.com/v1/games/' .. PlaceID .. '/servers/Public?sortOrder=Asc&limit=100'))
  26. else
  27. Site = game.HttpService:JSONDecode(game:HttpGet('https://games.roblox.com/v1/games/' .. PlaceID .. '/servers/Public?sortOrder=Asc&limit=100&cursor=' .. foundAnything))
  28. end
  29. local ID = ""
  30. if Site.nextPageCursor and Site.nextPageCursor ~= "null" and Site.nextPageCursor ~= nil then
  31. foundAnything = Site.nextPageCursor
  32. end
  33. local num = 0;
  34. for i,v in pairs(Site.data) do
  35. local Possible = true
  36. ID = tostring(v.id)
  37. if tonumber(v.maxPlayers) > tonumber(v.playing) then
  38. for _,Existing in pairs(AllIDs) do
  39. if num ~= 0 then
  40. if ID == tostring(Existing) then
  41. Possible = false
  42. end
  43. else
  44. if tonumber(actualHour) ~= tonumber(Existing) then
  45. local delFile = pcall(function()
  46. delfile("NotSameServers.json")
  47. AllIDs = {}
  48. table.insert(AllIDs, actualHour)
  49. end)
  50. end
  51. end
  52. num = num + 1
  53. end
  54. if Possible == true then
  55. table.insert(AllIDs, ID)
  56. wait()
  57. pcall(function()
  58. writefile("NotSameServers.json", game:GetService('HttpService'):JSONEncode(AllIDs))
  59. wait()
  60. game:GetService("TeleportService"):TeleportToPlaceInstance(PlaceID, ID, game.Players.LocalPlayer)
  61. end)
  62. wait(4)
  63. end
  64. end
  65. end
  66. end
  67.  
  68. function Teleport()
  69. while wait() do
  70. pcall(function()
  71. TPReturner()
  72. if foundAnything ~= "" then
  73. TPReturner()
  74. end
  75. end)
  76. end
  77. end
  78.  
  79. Teleport()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement