Some Ways to Use Badges

Hey there! Badges recently came out as free and I’ve seen so many people making posts badge related and so many people making posts helping people award badges. Here I’ll just post some simple badge awarding (or badge related things) methods that I haven’t seen posted on the DevForum below. Hope this helps.

Award Multiple Badges

There are two ways to do this, one way for joining and another for touching a part. Scripts are below.

Both Ways

First Way (Join Badges)

local WelcomeBadgeIDs = {"000000000", "000000000"}

game.Players.PlayerAdded:connect(function(p)
    wait()
    local b = game:GetService("BadgeService")
    for i,Badge in pairs(WelcomeBadgeIDs) do
      b:AwardBadge(p.UserId, Badge)
    end
  end)

Second Way

local badges = {000,000} -- Add as much badges as you want
local badgeService = game:GetService("BadgeService")

script.Parent.Touched:Connect(function(hit)
	local plr = game.Players:GetPlayerFromCharacter(hit.Parent)
	if plr then
		for i, badge in pairs(badges) do
			badgeService:AwardBadge(plr.UserId, badge)
		end
	end
end)

Award Badges On Meeting Somebody

Script

Met the Owner

local BadgeService = game:GetService("BadgeService")
local BadgeID = 000 -- Change the 000 to your badge Id

game.Players.PlayerAdded:Connect(function(Player)
	if game.Players:FindFirstChild("Your User Here") then
		for i, Plr in pairs(game.Players:GetPlayers()) do
			BadgeService:AwardBadge(Plr.userId, BadgeId)
		end
	end
end)

Award Badges

This is just the normal way to award badges.

View

Step on Part For Badge

local badgeservice = game:GetService("BadgeService")
local id = 0000000000

script.Parent.Touched:Connect(function(hit)
 
 if hit.Parent:FindFirstChild("Humanoid")then
  
  local plr = game.Players:GetPlayerFromCharacter(hit.Parent)
  badgeservice:AwardBadge(plr.UserId,id)
 end
end)

Extra (Award Badges and Mess Around With Badges)

Summary

How to Make Square Badges

This’ll be hard to explain, so a video by one of my friends will be provided down below after I explain it too. Remember, only PC users can do this.

First, go onto the Roblox Website and head on over to the “Create” tab and then down to “Decals” create any square image, for example I’m using this one:
image
After you have your image, upload it to the website. Wait until it loads and when it does, go over to Google or whatever browser you use and download the plugin, “BTRoblox” make sure to use this link so you don’t download the wrong one! BTRoblox.

After you’ve done that, go over to your decal and click the


icon and it should bring you to the same photo, but just a different ID. Copy down the ID at the top and then go to Create > Badges. Select what game you want to create the badge in and then upload a random image for it. Make a name, description, and then click, “Create Badge” it will ask you if you are sure, but don’t do anything there! Use the key bind CTRL + SHIFT + I to go into inspect. A whole page should pop up on the right side. Do CTRL + F and search up “imageid” and then paste your ID where the numbers are. Click upload and boom! You now have a square badge.

Edit: Here’s the link, I forgot to add it. Link

How to Award a Badge For Having a Gamepass

local BadgeIds = {000, 000} -- You can add as much badge IDs as you want.
local PassId = 000 -- Replace with your Pass ID

game.Players.PlayerAdded:connect(function(p)
	if game:GetService("MarketplaceService"):UserOwnsGamePassAsync(p.UserId, PassId) then
    	for i,Badge in pairs(BadgeIds) do
       game:GetService("BadgeService"):AwardBadge(p.UserId, Badge)
    end
  end
end)

Award a Badge On Certain Day (Credits to Inkthirsty, thought this was cool and wanted to add it in too.)

local Players = game:GetService("Players")
local BadgeService = game:GetService("BadgeService")

-- Leave as 0 or remove from table if there is no badge for it.
local Days = {
	["Monday"] = 0,
	["Tuesday"] = 0,
	["Wednesday"] = 0,
	["Thursday"] = 0,
	["Friday"] = 0,
	["Saturday"] = 0,
	["Sunday"] = 0,
}

Players.PlayerAdded:Connect(function(Player)
	for i,v in pairs(Days) do
		if os.date("%A",os.time()) == i then
			print(i)
			BadgeService:AwardBadge(Player.UserId,v)
		end
	end
end)

Award Badge for Being in Group

BadgeID = 0000000 -- Change to Badge ID
GroupID = 0000000 -- Change to Group ID
game.Players.PlayerAdded:connect(function(p)
	if p:IsInGroup(GroupID) then
		game:GetService("BadgeService"):AwardBadge(p.userId,BadgeID)
	end
end)

Award Badge For Being in Game For Specific Amount of Time

Simple but fun script.

BadgetId = 000 -- Put your Badge ID here, as always.

game.Players.PlayerAdded:connect(function(p) 
wait(000) -- Change to As long as you want (IN SECONDS)
b = game:GetService("BadgeService") 
b:AwardBadge(p.userId,BadgetId) 
end)

Badge Hunt Badge Model (Free)

Badge Hunt Badge Model

That’s pretty much it, some simple and fun scripts with badges for you to use in your game. Feel free to post your own scripts below. Hope this helped some people

20 Likes

Very useful tutorial for scripters who are still learning!

But wait, is the picture you put in Extra (Award Badges and Mess Around With Badges) really like this?

1 Like

It is, it’s the icon you should see at the top right of the decal after downloading BTRoblox! (I think it’s made by an admin too.

Yeah! It was hard for me to make scripts for badges when I started so I posted this here.

Nice tutorial for beginners but there are a quite a few badge tutorials out there so don’t see a ton of point for this tutorial.

1 Like

Oh I thought it was an error picture :sweat_smile:

1 Like

Yeah, I should probably have clarified that it wasn’t one

1 Like

Wrap the badge awarding in a pcall as it sometimes might fail.

1 Like

True. I agree with @commitblue .

When you are working with :
Badges , DateStore , Passes/Products , etc…

You should always wrap a pcall.

2 Likes

Thank you for posting the really useful tutorial, in my opinion, I feel giving badges to people when they join your game, kinda dilutes the value of badges in your game, and makes them less valuable (they are called badges after all). But I understand that it is a tutorial, not a recommendation for people to put badges in their game like it is provided.

1 Like

Yeah, but it’s mainly used for advertising the game across profiles. It is how some games start off.

Hmmm interesting, i’m not sure many people will be looking through other peoples badges, let alone clicking on the game, unless it’s a famous person

1 Like