The command /resetminigame already does this and comes with the game.
oh. Well then I'll make... ... ... /allplayerkill