How to make game mechanics for team vs bot/ai game

I want to make a game where you fight guards as a team (all players in 1 team ) where if you eliminate 10 guards you win, you loose if you runout of respawns or timer ends

How do I make the game end mechanics for this

Pls help im a beginner i tried doing it myself but when run out of respawns and die the game still shows victory for some reason :joy:

A solution without verse would be nice as I dont know verse

But if it can only be done with verse then fine I will try that if someone provide me the instructions :slightly_smiling_face: