Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local playerStats = {} --this keeps a list of the stats for each player that enters the game
- game.Players.PlayerAdded:connect(function(player)
- local leaderstats = Instance.new("Model", player)
- leaderstats.Name = "leaderstats"
- local grouprank = Instance.new("StringValue", leaderstats)
- grouprank.Name = "Rank"
- local rank = player:GetRoleInGroup(0) -- change to the group ID.
- if rank ~= 0 then
- grouprank.Value = rank
- else
- grouprank.Value = "Visitor" -- change to what you want non-group members to be called.
- end
- playerStats[player] = leaderstats
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement