Sure, here's what I'm using in S3D. Mostly nothing specific to multi-material printing, only the comment tags to mark start and end scripts, for filaswitch usage.

Start gcode
Code:
; START SCRIPT START
M83  ; extruder relative mode
G10 P0 R[extruder0_temperature] S[extruder0_temperature]; set extruder temp
G10 P1 R[extruder0_temperature] S[extruder0_temperature]; set extruder temp
G10 P2 R[extruder0_temperature] S[extruder0_temperature]; set extruder temp
G10 P3 R[extruder0_temperature] S[extruder0_temperature]; set extruder temp
G10 P4 R[extruder0_temperature] S[extruder0_temperature]; set extruder temp
G10 P5 R[extruder0_temperature] S[extruder0_temperature]; set extruder temp
M190 S[bed0_temperature] ; wait for bed temp
G28 ; home
M116  ; wait all temps
M572 D0:1 S0.0 ; disable pressure advance
; START SCRIPT END
End gcode
Code:
; END SCRIPT START
G4 ; wait
G91; relative positioning
G1 E-3.2 F2000
G10 P0 R0 S0 ; cool down
G10 P1 R0 S0 ; cool down
G10 P2 R0 S0 ; cool down
G10 P3 R0 S0 ; cool down
G10 P4 R0 S0 ; cool down
G10 P5 R0 S0 ; cool down
M140 S0 ; turn off heatbed
M107 ; turn off fan
G1 Z5 F1500
G90 ; absolute positioning
G1 X0 Y300; home X axis
M84 ; disable motors
; END SCRIPT END
Tool change script in S3D is empty, S3D adds the Tx command automatically.

This is the actual tool change gcode that is added by filaswitch and saved to a new file. This replaces every Tx command in the S3D gcode file.
Code:
; PURGE START
G1 Z4.0000 F960; z-hop
G1 X204 Y10 F10000; move to purge bucket
G1 X204 Y0 F10000; move to purge bucket
G10 P0 R190 S190
G10 P4 R190 S190
M116 P4
G1 E10.0000 F540; prepurge/ramming
G1 E-25.0000 F540; rapid retract
G4 P3500.0; cooling period
G1 E20.0000 F1500; long retract
G1 E-35.0000 F1500; long retract
G1 E-155.0000 F2000; long retract
G1 E-5.0000 F1500; long retract
T4; change tool
G1 E5.0000 F500; feed
G1 E165.0000 F2000; feed
G1 E20.0000 F1500; feed
G1 E5.0000 F300; feed
G1 E74.9381 F153; purge
G1 E10.0000 F80; slow purge
G10 P4 R205 S205
G10 P0 R205 S205
G4 P3000; ooze pause
G1 E-5.5000 F2100; retract
G90; absolute positioning
G1 X249 Y0 F5000; move from purge bucket
G1 X210 Y0 F5000; move from purge bucket
G1 X249 Y0 F5000; move from purge bucket
G1 X210 Y0 F5000; move from purge bucket
G1 X249 Y0 F5000; move from purge bucket
G1 X249 Y20 F5000; move from purge bucket
G1 X204 Y20 F5000; move from purge bucket
M83; relative E
G92 E0; reset extruder position
; PURGE END