Dynamic Acceleration in Movement?

I think I understand what you’re trying to do.

Just have them accelerate at the normal speed whenever the button is pressed.

Then if it’s released, check how long it was pressed for (store the initial time it was pressed in a variable to compare to). If it was short enough, give them an acceleration boost. Be sure to add a cooldown period so they can’t spam the move key and keep boosting!