Skip to content
Untitled Sandbox - Developer Documentation
docs/api/badges

@usbx/badges

Award badges

local badges = require("@usbx/badges")

badges.award

functionwaits

Gives the player the badge with this ID. Yields, and gives true only the first time the player gets it.

badges.award(player: Player, badge: number) -> boolean
example
badges.award(player, 12345)

Use it forrewarding a player when they finish the obby or find a secret in your map.

playerThe player who gets it.
badgeThe badge ID from the website.

badges.has

functionwaits

Whether the player has the badge. Yields; errors as award does.

badges.has(player: Player, badge: number) -> boolean
example
if badges.has(player, 12345) then print("welcome back") end

Use it foropening a secret door only for players who have already earned a certain badge.

playerThe player.
badgeThe badge ID from the website.
↑ ↓ moveEnter openEsc close