Advertisement
HowToRoblox

BadgeAwarderScript

Nov 17th, 2019
3,838
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.43 KB | None | 0 0
  1. local badgeservice = game:GetService("BadgeService")
  2. local id = 12345
  3.  
  4. local bool = script.OwnerInGame
  5.  
  6.  
  7. game.Players.PlayerAdded:Connect(function(plr)
  8.     if plr.Name == "TopSecretSpy1177" then
  9.         bool.Value = true
  10.        
  11.     elseif bool.Value == true then
  12.         badgeservice:AwardBadge(plr.UserId, id)
  13.     end
  14. end)
  15.    
  16. game.Players.PlayerRemoving:Connect(function(plr)
  17.     if plr.Name == "TopSecretSpy1177" then
  18.         bool.Value = false
  19.     end
  20. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement