I moved this over to the Event Requests since this can easily be done without an entire script.
For button mashing, use a parallel process that has a Conditional Branch in it. Use a script condition (tab 4) and put
Note that Input::C refers to Enter, Space, or Key C. Refer to the Help Manual under Game Controls for more specifics.
Right after it, put a Control Variables command and increase a variable by 1. Be sure to also add in some kind of timer so that you can turn the parallel process off when the timer reaches zero. Then just have another event compare the value of the variable and give a reward based on the value.
Button input can mean a number of things. If you mean something like input timing (Mario RPGs, Dance Dance Revolution, or any kind of rhythm game), the process is still somewhat the same. Create a timer and have the conditional branch check that a button is being inputted (like the condition above) AND the timer is in between a certain interval. If so, turn a switch on, add a number to a variable, etc.