Button mash script

What I need is a script for button mashing that is easy to customize so I can make it progressively get harder and harder.

I want something like the button mash mechanic from (Mario) The Music Box.
(Skip to 3:29)

It's really important that there is a HUD displayed on screen.
And that I can customize which swich will be activated when player succeeds or fails. (Much like in the MOG scripts)
I hope I was specific enough.
Can't you use a variable HUD script + an autorun event with a conditional branch (if player presses _, variable goes up) + another conditional branch for when the player succeeds or fails to trigger a switch?

Galv's Variable Instance Bars can let you pick whatever variable can be assigned for your button mashing. https://galvs-scripts.com/galvs-variable-instance-bars/
Can't you use a variable HUD script + an autorun event with a conditional branch (if player presses _, variable goes up) + another conditional branch for when the player succeeds or fails to trigger a switch?

Galv's Variable Instance Bars can let you pick whatever variable can be assigned for your button mashing. https://galvs-scripts.com/galvs-variable-instance-bars/

That's not what I need. I need something between the Atelier Rgss Chain Commands and the Mario the music box button mash where the bar fights back and if you don't press quick enough it reverts back to zero. I have no interest in doing this with events, since if I did I wouldn't have posted this in the script requests in the first place.

Original thread: https://forums.rpgmakerweb.com/threads/button-mash-script.104362/