Report as inappropriate

Can you tell me how is it possible to print every process 2layer heigt in diffrent collors? Is this code right? :
{REPLACE "\nM117 Layer 4, Z=" "\nG1 X10 Y5\nM0\nG1 X0 Y0\nM117 Layer 4, Z="}
What have i to change in the code that it change the filament after every process. An where have i to put the g gode? Start scripte side last box?