Key smash mini game

hello! does anyone know how to make key smash button that has a bar that goes up if the button isn't being triggered? 😴

example: In horror games when you are running away from a monster and stumbled upon a door and it gives a player an option to hold the door closed while the monster tries to open it on the other side. Im thinking to add a mini key smash game and when the player fails to do so the door will break and the monster gets the player!

Ive seen a video about this before but I cannot find it again for the life of me 😅 But I could probably try and make it manually but Idk how to add a picture or do a bar that goes up.
Yeah check for button press in conditional branch. Once you register it check that it isn't pressed again before registering again so you can't hold it, there's the triggered check but then you have to build the event so that it checks it every frame I think. Make the button press increase a variable. Then you use the script call of 'show picture' to show the bar pic (and a black background pic) where you can set the scale of the pic with the variable your action button increases, thus increasing the bar length. When the variable reaches a certain value you have a conditional that does whatever you want.
EDIT: Oh if you want the bar to move when the key isn't being triggered, then you check not triggered and do the same stuff I wrote.
here is a nice [tutorial] for it without plugins.

its for MV, but I think you can convert it to MZ as it should be
equal though =)

Original thread: https://forums.rpgmakerweb.com/threads/key-smash-mini-game.177563/