Problems with Workshop Game

I need help figuring out some stuff for a game. It’s Death Match and the point is to turn all players into the same hero.

I want someone to be able to pick a hero. That hero is then considered a team. Anyone else of that hero is part of that team, and cannot hurt people on their team. They can, however hurt people on other heroes, which are the enemy teams. They can also switch people to their team by killing them and their hero will switch to match their own. Their team will also switch by being killed by another hero. If they are switched, they shouldn’t be able to attack their new team, but should be able to attack their old team and anyone else on enemy teams.

BASICALLY
1 Hero=1 Team
Hero/Team cannot damage their own Hero/Team, but can damage other Heroes/Teams
Death=Switch Hero/Team to Hero/Team of Killer
The person who is attacked will switch to a new Hero/Team. They should no longer be able to damage their new Hero/Team, but should be able to damage their previous Hero/Team and anyone other Heroes/Teams.

WHAT I CAN ACCOMPLISH
Death=Switch Hero/Team to Hero/Team of Killer
The person killed will switch to the Hero/Team of their Attacker
Damage=None to Current or Previous Heroes/Teams
When you are the same Hero/Team as someone, you cannot damage them. However, if you switch, you cannot damage any new or previous Heroes/Teams either.
Attacker=Invincible
If you are killed by someone, you cannot hurt that someone even if they switch Heroes/Teams

The Winning system also seems to be broken. I know how to disable the normal Scoring and Winning, but I can’t figure out how to make it declare a Winner when all players are the same Team/Hero.

EXAMPLE
NOTE: I AM USING SOLDIER, REAPER, AND ANA AS EXAMPLE ONLY. I DO NOT WANT THE INFECTION GAME MODE. ALSO, FOR SAKE OF THE EXAMPLE, THIS IS A 3-PERSON GAME
3 players choose Soldier, Reaper, and Ana as their starting Heroes/Teams. Later in the game, the Soldier is killed by a Reaper. The Soldier is then changed to Reaper and is now part of their Hero/Team. The original Reaper is later killed by the Ana and switched to that Hero/Team. This player doesn’t want to be Ana and goes to the Soldier(now Reaper) they killed earlier. That player then attacks and kills them, bringing them back to the Hero/Team of Reaper. The player, now no longer Ana, proceeds to kill the Ana, bringing them to Team Reaper. Team Reaper is then Declared the Winner.

It’s an infection gamemode and it already exists. Check the code of one of them.

They just make all the Reapers invincible to everyone, that’s not what I want. Also, while it is LIKE infection, it is with all heroes, and normal abilities and damage. I simply want it so that Soldiers can’t harm other Soldiers, Reapers can’t harm other Reapers, Anas can’t harm other Anas. So on and so forth, that sort of thing