Need a setting for the value of Z lift on tool change.
Before executing the user tool change script the Z has to lift up.
After the tool returns to the place it left before tool change the Z is restored.
In version 4.0.1 the custom script on tool change is inserted directly before T0, T1.
Therefore adding G91, G1 Z2, {code}, G1 Z-2, G90 will drop the Z before the tool does the travel to the print location scratching the surface of the printed part.
Here is the video:
https://www.youtube.com/watch?v=GQhkLE9Y4wQ
