add a script to change mode.