Advertisement
Guest User

Untitled

a guest
Aug 18th, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. local playerStats = {} --this keeps a list of the stats for each player that enters the game
  2.  
  3. game.Players.PlayerAdded:connect(function(player)
  4. local leaderstats = Instance.new("Model", player)
  5. leaderstats.Name = "leaderstats"
  6.  
  7. local grouprank = Instance.new("StringValue", leaderstats)
  8. grouprank.Name = "Rank"
  9. local rank = player:GetRoleInGroup(0) -- change to the group ID.
  10.  
  11.  
  12. if rank ~= 0 then
  13. grouprank.Value = rank
  14. else
  15. grouprank.Value = "Visitor" -- change to what you want non-group members to be called.
  16. end
  17.  
  18. playerStats[player] = leaderstats
  19. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement