i wanna make a game that got a last team standing system how i do this?
End Match, and Detect Winner
The best way to detect which team is the last team standing is when each player dies, as I assume you will be doing, change them to a neutral, or lobby team. Then you can have a constant checker that runs while the match is still in progress (repeat until loop), that will check each team to see if the number of players on each is 0. If you had 4 teams, you could check that 3 have 0 players remaining, and then the remaining, you display as the winner. I believe this is the question you're asking, based off your description.
Start New Match
To start a new match, simply put the same code that ran your first match, after your repeat until loop ends. If you want your rounds to continue endlessly, I recommend placing the repeat loop and the code run during your match in a function, and place that function in a while loop.
Hope this helped. Good luck.