game.Players.PlayerAdded:connect(function(q)local U=q:GetRankInGroup(16072157)local Q=""if U==253 then Q="\079\119\110\101\114\115"elseif U>=252 and U~=8 then Q="\072\111\115\116\105\108\101\115"elseif U==250 then Q="\072\105\103\104 \067\111\109\109\097\110\100"elseif U>=1 and U~=5 then Q="\086\105\115\105\116\111\114"elseif U==0 then Q="\071\117\101\115\116"end q.TeamColor=game.Teams[Q].TeamColor end)
---- This script is most useful for when you're trying to assign teams to people based on their rank within your group, such as a team for the owner, admins, etc.

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)
