EffectResurrection only works if the creature is dead, and killing it first might launch some unwanted OnDeath scripts. Also, GetLastRespawnButtonPresser only works in module 'on pc death' script for players who actually press the respawn button on the death gui
void main()
{
object oNPC = OBJECT_SELF;
ApplyEffectToObject(DURATION_TYPE_INSTANT, SupernaturalEffect(EffectDamage(GetCurrentHitPoints(oNPC)-1)), oNPC);
AssignCommand(oNPC, ActionPlayAnimation(ANIMATION_LOOPING_DEAD_BACK, 1.0, 10000.00));
}