ADVERTISEMENTREMOVE ADS
Game icon

get (almost all) badges

Grace
3 months ago
Script preview thumbnail
Script Preview

Description

get every single badge in the game idk

ADVERTISEMENTREMOVE ADS
23 Lines • 799 Bytes
Raw
local HS = game:GetService("HttpService")
local BG = game:GetService("ReplicatedStorage"):WaitForChild("BadgeGot")
local http = http_request or request
local uId = game.GameId
local function g()
local ids, cur = {}, ""
repeat
local url = ("https://badges.roproxy.com/v1/universes/%d/badges?limit=100&sortOrder=Asc%s")
:format(uId, cur~="" and "&cursor="..HS:UrlEncode(cur) or "")
local res = http({Url=url, Method="GET"})
if not res or res.StatusCode~=200 then break end
local data = HS:JSONDecode(res.Body)
for _,b in ipairs(data.data or {}) do ids[#ids+1]=b.id end
cur = data.nextPageCursor or ""
until cur==""
return ids
end
for _,id in ipairs(g()) do
BG:FireServer(id)
task.wait(0.1)
end
ADVERTISEMENTREMOVE ADS

Comments

0 comments
to add a comment
Loading comments
ADVERTISEMENTREMOVE ADS