Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

How to make a badge giver GUI?

Asked by 10 years ago

So I want to know how to make a gui give you a badge, like when you click the button it gives you a badge (ex. gui pops up saying "Click here to get free badge)

1 answer

Log in to vote
0
Answered by
hudzell 238 Moderation Voter
10 years ago
--LOCALSCRIPT LOCALSCRIPT LOCALSCRIPT--

local id = 0 --Badge ID here

script.Parent.MouseButton1Down:connect(function()
    print("Awarding BadgeID: " .. id .. " to UserID: " .. game.Players.LocalPlayer.userId .. "via. GUI")
    local b = game:GetService("BadgeService")
    b:AwardBadge(game.Players.LocalPlayer.userId, id)
end)
Ad

Answer this question