SRD:Energy Drain (Spell)

You point your finger and utter the incantation, releasing a black ray of crackling negative energy that suppresses the life force of any living creature it strikes. You must make a ranged touch attack to hit. If the attack succeeds, the subject gains 2d4 negative levels.

If the subject has at least as many negative levels as HD, it dies. Each negative level gives a creature a –1 penalty on attack rolls, saving throws, skill checks, ability checks, and effective level (for determining the power, duration, DC, and other details of spells or special abilities).

Additionally, a spellcaster loses one spell or spell slot from his or her highest available level. Negative levels stack.

There is no saving throw to avoid gaining the negative levels, but 24 hours after gaining them, the subject must make a Fortitude saving throw (DC=energy drain spell’s save DC) for each negative level. If the save succeeds, that negative level is removed. If it fails, the negative level also goes away, but one of the subject’s character levels is permanently drained.

An undead creature struck by the ray gains 2d4x5 temporary hit points for 1 hour.