Turning off Sprint with a script call

I am creating a common event that provides the player with sprinting stamina, important for the survivor horror style of gameplay I am working with.

I have the entire event set up, except for one key detail: I cannot find an eventing way to shut off sprint. I assume this is going to require a script call, and I know where in the scripts the dash is controlled. What I do not know is how to enable/disable that for a limited time.

Any help would be greatly appreciated.
Where it says

Code:
return Input.press?(:A)
change it to
Code:
return Input.press?(:A) && $game_switches[15]
then turn switch 15 on when you want to enable dashing, and off when you don't. Of course, substitute 15 for whatever switch you want to use, and make sure you name the switch so you don't accidentally use it for something else.
Fantastic, this works like a charm. Thanks!

Original thread: https://forums.rpgmakerweb.com/threads/turning-off-sprint-with-a-script-call.45852/