I am creating a mob arena using command blocks and redstone. But i need to know how to be able to create different levels that can only be started by defeating the entire prior level without having multiple buttons, and if i had multiple buttons for each level the player could abuse this system by farming a easier level to get items to buy items for the next battles, not to mention i am creating a hundred levels so thats a hundred buttons and a hundred redstone lines... So i would like to have one button that you can only click after defeating all of the current wave to be able to start the next wave.
Mob drops are unreliable so i cant create a giant hopper system requiring a drops from the mobs of that wave to start the next level, sometimes you will get extra drops then you need so they can start it before the current level is complete and sometimes less, not to mention i am using mob drops of a way to buy items so that would undermine the shopping system i have in place.
I haven't played minecraft since it seems countless updates ago so all my prior knowledge of commands has died because they changed the format for most commands.