Pleayer auto team

It would be

game.Teams.Headquarters.PlayerRemoved:Connect(function(plr)
-- Before adding this event listening, make sure the team exists.
end)