Advertisement
YANIS_EXPLOITS

Notsameserver.json

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