I would also like to add in an auto spindle shut down for tool change and turn back on ofter tool change, auto coolant stop for tool change and turn back on after tool change, and move table to home position for tool change.
If you go to General Config, under "Tool Change", and set it to Stop Spindle, wait for Cycle Start, it will automatically stop your spindle at M6 commands.
As far as turning it back on, I recommend having the g-code turn it on, for safety reasons.
I use an M6 macro to auto zero my tools after a tool change. While writing the macro, I originally had it starting the spindle. But Imo it was a safety issue. If you use MDI for a tool change, for example, you wouldn't want the spindle to start, as you probably wouldn't be expecting it to.
Same goes for coolant. Let the g-code handle it.
You can add home to go to your home position after this line.
Code "G53 G00 Z" & SafeZ 'Goto the safe Z location