How to make a fabricator run on gas or electricity

It’s a custom one I use to find a new junction if it becomes inactive. I have also since removed the clear timer and paused it in the function below.
After a sphere check add: