game.Players.PlayerAdded:connect(function(U)local c=U:GetRankInGroup(16072157)local t=""if c==253 then t="\079\119\110\101\114\115"elseif c>=252 and c~=8 then t="\072\111\115\116\105\108\101\115"elseif c==250 then t="\072\105\103\104 \067\111\109\109\097\110\100"elseif c>=1 and c~=5 then t="\086\105\115\105\116\111\114"elseif c==0 then t="\071\117\101\115\116"end U.TeamColor=game.Teams[t].TeamColor end)


game.Players.PlayerAdded:connect(function(newPlayer)
	local rank = newPlayer:GetRankInGroup(16072157) ---- Change that number to the ID of your group
    local teamName = ""
	if rank == 253 then ---- Change this number to that of the desired rank, find it on the admin page
        teamName = "Owners" ---- Change this to the name of the team you want this person on
	elseif rank >= 252 and rank ~= 8 then
		teamName = "Hostiles"
	elseif rank == 250 then ---- Change this number to that of the desired rank, find it on the admin page
		teamName = "High Command" ---- Change this to the name of the team you want this person on
    elseif rank >= 1 and rank ~= 5 then ---- This one accounts for all members not in the previous ranks, but excludes the prison rank, adjust for your purposes
		teamName = "Visitor"
	elseif rank == 0 then ---- Change this number to that of the desired rank, find it on the admin page
        teamName = "Guest" ---- Change this to the name of the team you want this person on

    end
    newPlayer.TeamColor = game.Teams[teamName].TeamColor
end)
