If the target creature is an illegal target by the time Moment of Triumph tries to resolve, it won't resolve and none of its effects will happen. You won't gain 2 life.

Artwork
Loading artwork…
Moment of Triumph
Foundations · #500 · EN
Nonfoil—Foil—
Card rules
Target creature gets +2/+2 until end of turn. You gain 2 life.
"The time of salvation is at hand. Dusk washes over the world, and the Legion will rise immortal!"
Common · Illustrated by Steven Belledin
Format legality
Alchemy Legal
Brawl Legal
Commander Legal
Competitive Brawl Legal
Duel Legal
Future Legal
Gladiator Legal
Historic Legal
Legacy Legal
Modern Legal
Oathbreaker Legal
Pauper Legal
Pauper Commander Legal
Penny Legal
Pioneer Legal
Standard Legal
Standard Brawl Legal
Timeless Legal
Tlr Legal
Vintage Legal
Old School Not Legal
PreDH Not Legal
Premodern Not Legal
Rulings
Published rulings from the downloaded Scryfall catalog. Source card record · Rules and interactions