Advertisement
HowToRoblox

GiveTitleGuiScript

Dec 14th, 2019
1,111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.46 KB | None | 0 0
  1. local title = game.ServerStorage.PlrTitleGui
  2.  
  3. local groupId = 2929563
  4.  
  5.  
  6. game.Players.PlayerAdded:Connect(function(plr) 
  7.     plr.CharacterAdded:Connect(function(char)
  8.    
  9.         local plrTitle = title:Clone()
  10.        
  11.         plrTitle.PlrName.Text = char.Name
  12.        
  13.         if plr:IsInGroup(groupId) then
  14.            
  15.             plrTitle.GroupRank.Text = plr:GetRoleInGroup(groupId)
  16.            
  17.         else
  18.            
  19.             plrTitle.GroupRank:Destroy()
  20.            
  21.            
  22.         end
  23.        
  24.         plrTitle.Parent = char.Head
  25.        
  26.     end)
  27. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement