There's an OnDeath StoryManager Event (or OnKill ... I can't remember!) ... anyway, trap that using the Story Manager System, then get SM to start a Quest to do scripting or whatever ....
http://www.creationkit.com/Bethesda_Tutorial_Story_Manager and http://www.creationkit.com/Category:Story_Manager and http://www.creationkit.com/SM_Event_Node
You could, instead, do it with spells ... applying a OnDeath Script to any NPC in the area of the PC ... http://www.creationkit.com/Dynamically_Attaching_Scripts