What version of Mach3 is that?
You edit the homing script in Mach3, not the screen editor.
Operator > Edit Button Script, and click the button.
Do you have two home switches, one for the master and one for the slave? If so, make sure in General Config, that "Home Slave with Master" is not checked.