UPDATE!(1.0.57) - Much faster now as it doesn't need to close / reopen the track list.
This script will invert the phase of a track by selecting all clips on the track and flip their polarity via clip FX.
Works with multiple tracks.
Use it once then A/B via undo/redo
Requires Pro Tools Ultimate.
Please read the documentation - it's short.