Check if player has Roblox badge

The title mentions it all. Let’s say that I want to detect that someone has the Bricksmith Badge or Administrator Badge.

Upon joining, I may detect them in my game to grant special privileges.

4 Likes

I did some digging and found the Roblox API which you can request for Roblox Badges:

https://accountinformation.roblox.com/v1/users/1/roblox-badges

I’m not so familiar on how you can post a request to get the information from the API though. I just know that you need a proxy to connect to the API.

5 Likes
local httpService = game:GetService("HttpService")

local getBadges = function(userId)
	local success,response = pcall(function()
		return httpService:GetAsync(`https://accountinformation.roproxy.com/v1/users/{userId}/roblox-badges`)		
	end)
	if success and response then
		return httpService:JSONDecode(response)
	else
		return false
	end
end

print(getBadges(1))
5 Likes
-- local script

local plr = game.Players.LocalPlayer
local BS = game:GetService("BadgeService")

local administratorBadgeId = 1598556792

if BS:UserHasBadgeAsync(plr.UserId, administratorBadgeId) then
	print("Player has badge")
else
	print("Player does not have badge")
end
2 Likes

He’s talking about OFFICIAL ROBLOX BADGES. Not game badges.

Official Roblox Badges

4 Likes

I actually thought it was the id of Administrator Badge lol

If Roblox Badges then you can do like @Deb0rahAliWilliams or @Jumpathy

2 Likes