Slider linked to translation

I would like to translate a plane along its normal by using a slider. I’d like to be able to move this slider that would indicate the distance of the current translation and do the translation in the 3D view . Moving the plane along its normal in the 3view would also act on the slider and make it change its value so that we can see the quantity of translation.

Is there anyway to script that ?