Bases now have code that let them change team

I don't know how I got it all to work but it works