Add a Timer component.
Go to Inspector set the wait_time to 10 and then click in Node.
Double click in timeout() and link to your script. This will create a function ontimer_timeout() in your script. Write the code to set the motion or velocity to 0.
Somewhere in your code, activate the timer:
if Input.is_action_just_pressed("ui_up") :
if get_node("Timer").is_stopped():
get_node("Timer").start()
Don't forget to stop the timer. You may use the option one shot for this or in your script inside ontimer_timeout() write get_node("Timer").stop()
P.s.: Depending of the nodes you may use getparent().getnode("Timer")