How Would I Award Badges Like This?

Yeah. But I’m using that now.

I was wondering if there was a way to go through only 5-20 badges, since the IDs aren’t far from eachother.

My friend helped me make a solution. Here’s the script if you’re wondering!

badge = {}
local id = game.GameId
local c = ""
local stop = false
local db = false
while stop == false do
	local m = game:GetService("HttpService"):JSONDecode(game:GetService("HttpService"):GetAsync("https://badges.roproxy.com/v1/universes/" .. id .. "/badges?limit=100&cursor=" .. c .. "&sortOrder=Asc"))
	for q=1,#m.data do
		table.insert(badge,m.data[q].id)
	end
	if m.nextPageCursor == nil then
		stop = true
	else
		c = m.nextPageCursor
	end
end
wait(2)

script.Parent.Touched:Connect(function(hit)
	if hit.Parent:FindFirstChild ("Humanoid") then
		local plr = game.Players:GetPlayerFromCharacter(hit.Parent)
		if db == false then
			db = true
			for _,p in pairs(game.Players:GetChildren()) do
				for i=1,#badge do
					game:GetService("BadgeService"):AwardBadge(plr.UserId,badge[i])
				end
			end
			wait(5)
			db = false
		end
	end
end)