It depends on the game. For example, if you are using Platform behavior, you can temporarily increase its maximum speed and apply vector X in the direction of the dash. Say, max speed=2000 and vectorX=-2000. Also disable player controls.
After a small delay enable the controls and restore the max speed.