Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if syn.queue_on_teleport then
- syn.queue_on_teleport('game:GetService("ReplicatedFirst"):RemoveDefaultLoadingScreen()')
- end
- local Decision = "any"
- local GUIDs = {}
- local maxPlayers = 0
- local pagesToSearch = 100
- local Http = game:GetService("HttpService"):JSONDecode(game:HttpGet("https://games.roblox.com/v1/games/"..game.PlaceId.."/servers/Public?sortOrder=Asc&limit=100&cursor="))
- for i = 1,pagesToSearch do
- for i,v in pairs(Http.data) do
- if v.playing ~= v.maxPlayers and v.id ~= game.JobId then
- maxPlayers = v.maxPlayers
- table.insert(GUIDs, {id = v.id, users = v.playing})
- end
- end
- if Http.nextPageCursor ~= null then Http = game:GetService("HttpService"):JSONDecode(game:HttpGet("https://games.roblox.com/v1/games/"..game.PlaceId.."/servers/Public?sortOrder=Asc&limit=100&cursor="..Http.nextPageCursor)) else break end
- end
- game:GetService("TeleportService"):TeleportToPlaceInstance(game.PlaceId, GUIDs[math.random(1,#GUIDs)].id, cmdlp)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement