Making game mode, some bugs and need help please (Mic, map change, commands)

Ok, i have been searching everywhere for this, and i really need help here are my problems

  1. when all of team 2 dies (there are 3 teams) change map
  2. At the start of game, it chooses 1 person randomly and sets them team 1
  3. i want to have it so team 3 and 1 cant kill each other
    (I’m having a infected game, where there is a tank zombie (team 1) and then humans (team 2) then the tank kills a human and minions spawn (team 3) and try to kill humans aswell)
    please help, they are the bugs im having
    Thanks so much for just reading this, and if you can help thank you very very much
    i am a major noob at lua, and trying to recreate halo 3 minigames, this is fat kid im working on :smiley: