Hi there I want to make a custom leaderboard what instead of showing only one status icons shows all status icons a player can have but I came up to check if a player is a Roblox staff currently it’s checks if player is in the Roblox official group but not every staff is on it it’s for a game jam games so ye Roblox staff will join it is there a proper way to check for it I also will check for star member and if verification badge
3 Likes
Im pretty sure you could just check the admins and video star group so like this:
Star Creators:
game.Players.PlayerAdded:Connect(function(plr)
if plr:IsInGroup(4199740) then
-- Player is a star creator
end
end)
Admins
game.Players.PlayerAdded:Connect(function(plr)
if plr:IsInGroup(1200769) then
-- Player is an admin
end
end)
4 Likes
I did but not all Roblox staff is in that group
Well how can I check for friends playing or friend receusts and the verified badge
The leaderboard script is a server script cuz it needs to apply for all clients but the friends icons are local
3 Likes
Afaik there is no direct way of checking if a Roblox player is an admin so i think the group is the best thing we have atm, but take that with a grain of salt since i havent gone too deep into this
3 Likes
he also said verification badge lol
2 Likes
simple just use
plr:IsVerified()
3 Likes
And the friends playing and friend request
2 Likes
local function isVerified(userId: number): boolean
local player = game.Players:GetPlayerByUserId(userId)
--pcall this
if player then return player:IsVerified() end
--proxy this
local url = "https://users.roblox.com/v1/users/"..userId
--pcall this
local response = game.HttpService:GetAsync(url)
local data = game.HttpService:JSONDecode(response)
return data.hasVerifiedBadge
end
local function isStarCreator(userId: number): boolean
--pcall this
local groups = game.GroupService:GetGroupsAsync(userId)
for _, group in pairs(groups) do
--Star creators group id
if group.Id == 4199740 then return true end
end
return false
end
local function isAdmin(userId: number): boolean
--proxy this
local url = "https://accountinformation.roblox.com/v1/users/"..userId.."/roblox-badges"
--pcall this
local response = game.HttpService:GetAsync(url)
local data = game.HttpService:JSONDecode(response)
for _, badge in pairs(data) do
--Administrator badge id
if badge.id == 1 then return true end
end
return false
end
4 Likes