If the target creature is an illegal target by the time Contract Killing resolves, the entire spell doesn't resolve. You won't get Treasures. If, on the other hand, the target is a legal target but isn't destroyed (most likely because it has indestructible), you'll get Treasures.

Artwork
Loading artwork…
Contract Killing
Foundations Jumpstart · #413 · EN
Nonfoil—Foil—
Card rules
Destroy target creature. Create two Treasure tokens. (They're artifacts with "
, Sacrifice this token: Add one mana of any color.")
For a price, the floating city of High and Dry offers all the amenities a pirate could want: rest, recreation, and revenge.
Common · Illustrated by Winona Nelson
Format legality
Brawl Legal
Commander Legal
Competitive Brawl Legal
Duel Legal
Gladiator Legal
Historic Legal
Legacy Legal
Modern Legal
Oathbreaker Legal
Pauper Legal
Pauper Commander Legal
Penny Legal
Pioneer Legal
Timeless Legal
Vintage Legal
Alchemy Not Legal
Future Not Legal
Old School Not Legal
PreDH Not Legal
Premodern Not Legal
Standard Not Legal
Standard Brawl Not Legal
Tlr Not Legal
Rulings
Published rulings from the downloaded Scryfall catalog. Source card record · Rules and interactions