How to create double click preventative extension

so these events helps me away from double clicking

as you can in image ,

the variable MF in square triggers when button pressed ,and when released,it changes the value to trigger final animation ,.can i make this into an extension so instead of writing it again and again .

Add a function.

i know that part man , but i dont know how ,would it work for every scene

Better you create an external event and link it to every scene.