Second Coming (3.5e Spell)

If used on a corpse of a once-living creature, this spell immediately raises that creature as an undead with an applicable LA +0 template of your choosing until the spell expires. If used on a living creature, they become cursed to become an undead upon the moment of their death as long as they die within the spell's duration. If the creature yet lives when the spell expires, the casting is useless.

Regardless of what fashion in which it was created, the newly created undead has full hit points when formed, but instantly dies again when the spell expires. This spell cannot be used on a creature whose remains were destroyed, nor does it function if the subject it was cast on (if living) has their body destroyed.