front end script switch