MV Charge an ability with the spacebar?

So as many of my friends here know, I’m developing a game called Fandom Scouts, which mainly stars characters from FNAF, BATIM, Cuphead, Undertale (sorry), and Dark Deception. There’s a few moves I want to make a little more in depth than the default system allows. For instance, the characters Lolbit, LOLZHAX 2.0, Mettaton, and a few others will have a move called “Super Ray” that is only unlocked at Level 20. This is one of the moves I’d like to customize.
The move, like other high-power moves, is charged by mashing the spacebar on the keyboard repeatedly. How powerful it is depends on how many times the spacebar is pressed in 1.5 seconds. Each time it is pressed, the beep it plays gets higher pitched. I have the beep sounds already made, there are seven of them! There are also seven segments to the meter, seven being the highest power and the hardest to get to in a single second. My plan is that level seven of power guarantees a critical hit. Also, when you reach seven, the charging routine automatically stops, and you are prompted to stop pressing space by a quiet alarm (I’ve also already designed that sound). Once you do, the move is performed.

Because it’s so powerful, Super Ray is going to require 100 TP. Just wanted to throw that out there.

The powers that use this method of “charging” are:
  • Super Ray, as mentioned above. Used by the Rare Animatronic class.
  • Waterhose. It’s based on a FNAF World move, but is different. Instead of instant death, like in FW, it causes Water elemental damage. Used by the Magi and Seafaring class.
  • I’ll think of some others, for now, these are the only two.
(TRIVIA: Only ONE person is in the Magi class—it’s Major Minty, a super rare character! She plays a critical role in the game, but is not playable unless you find a certain Easter Egg in the game. She’s worth it, though. Major Minty is SUPER POWERFUL!)
I’d like to be able to use this mechanic but I don’t know coding yet. I’d love to learn but right now, just need a little help. This method should be useable in multiple moves, not just those two, as I plan to design more moves to use it.
Now, if you’ll excuse me, I think I’m sick… so I’m going to lay back and rest.

It's not being maintained, but he has a lot of timed attack plugins and I believe this one would give the results you want closest.

It's not being maintained, but he has a lot of timed attack plugins and I believe this one would give the results you want closest.
Thanks! I didn't know this existed.
You're welcome. Note, because I'm nitpicky, I'd make sure the skill in question has a lower limit on damage if you do nothing during the timed hit (and maybe even an amount that still worth spending TP on). Some of his examples set up timed hits to basically fail entirely if you don't do it right instead of being merely passable.

Original thread: https://forums.rpgmakerweb.com/threads/charge-an-ability-with-the-spacebar.136081/