How to make all eliminated players revive?

I’m creating a map that works infinitely, it’s basically a hide and seek game. I would like players to be able to spectate other players during the round and then revive when the round ends, but I still don’t understand much about Verse. I really don’t know what the code would be… Does anyone have a ready-made code? I would need it to be editable so that I can activate the device with a trigger.