print("Team Script")
local BUILD_GROUP_ID = 42
local function playerJoin(player)
if player:IsInGroup(BUILD_GROUP_ID) then
player.Team = game.Teams["도둑"]
else
player.Team = game.Teams["경찰"]
end
local leaderstats = Instance.new("Folder")
leaderstats.Name = "leaderstats"
leaderstats.Parent = player
local score = Instance.new("IntValue")
score.Name = "Score"
score.Value = 100
score.Parent = leaderstats
local rank = Instance.new("StringValue")
rank.Name = "Rank"
rank.Value = player:GetRankInGroup(BUILD_GROUP_ID)
rank.Parent = leaderstats
local role = Instance.new("StringValue")
role.Name = "Role"
role.Value = player:GetRoleInGroup(BUILD_GROUP_ID)
role.Parent = leaderstats
end
game.Players.PlayerAdded:Connect(playerJoin)
사용자가 접속 했을 때
그룹에 따라 Team을 할당하고
leaderstats라는 이름의 폴더를 만들어
그 아래 점수, Rank, Role을 추가하여 표시하는
스크립트 입니다.
![](https://nooblox.com/wp-content/uploads/2021/02/image-1024x671.png)