Control movement/turn

Hello Everyone,
i need help in controling the turn of action.
Example:
i moved an object a certain distance.
once it reaches a distance then it stops.
** i want to have a button; when you press will allow you to move the object again for the same distance.(what is code to do that)…then will need press button to allow it to move again.
thank you