How could a make a simple como system for a 2D game?

I would like to make a simple combo system just pressing one botton to make multiple swort attack.

I’d say an Int variable should do. Press hit, check the Int value. If it’s 0, perform first attack, add 1, start a retriggerable delay. Press hit again, if Int == 1 => perform second attack, add 1, restart the retriggerable delay, and so on and so forth. If delay ends, set Int back to 0. Rinse and repeat.