PINKIE PROMISE Endings

How the PINKIE PROMISE ending sequence works, what triggers each outcome, and what changes on a replay.