Variable math for button so it knows when I push it

Is this the thread you were looking for?