Hello everyone!
I’m here today to announce a very small, yet useful module for new / beginner scripters. This module allows you to grant badges to players with ease, getting information of badges (such as names or icon id), and checking if player has a specific badge.
If you know what you’re doing, here is the link to module.
What’s BadgesPlus?
BadgesPlus is a brand new useful module, that has 3 main functions;
- Checking if player has badge (returns true or false)
- Giving badge to player (returns true or false)
- Checking info of a badge (returns info or error)
How to setup?
- Get the model here
- Install the module into “ReplicatedStorage” [for client and server accessibility)
- Require the module using
require("path.to.module")
← replace with path
Documentation
local module = require("Path to this module") --> ... replace with actual path
module.playerHasBadge(player, badgeId, output) --> ... returns true or false
module.awardBadge(player, badgeId, output) --> ... returns true or false
module.getBadgeInfo(badgeId, output) --> ... returns info or error
The ‘playerHasBadge’ function checks if the player has a badge with the specified arguments (player = player, badgeId = the badgeId, and output being a boolean, and if set to true it will print the result (being success)
The ‘awardBadge’ function gives a badge to a player. Same arguments as ‘playerHasBadge’ function.
The ‘getBadgeInfo’ function gets info of a badge such as description, icon Id, and name of the badge. Same arguments as ‘awardBadge’ minus the player argument.
Arguments
player → PlayerObject — e.g required ; game.Players.JavyDev
badgeId → number — e.g required ; 123456789
output → boolean — … optional ; e.g true
Version
v1.0
→ Probably won’t be updated.
Notes
Please note that this is the most simplest way you could do it, and it’s in a module → so it won’t run if it isn’t required.
Any issues, please report them here, or contact me on Roblox.
Example usage
-- Welcome badge giver using BadgesPlus
game.Players.PlayerAdded:Connect(function(p)
local hasBadge = module.playerHasBadge(p, badgeId)
if not hasBadge then
module.awardBadge(p, badgeId) --> ... returns true or false (true meaning success)
else
--> already has badge!
end
end)