The script might fail if the hooks are called before the player is actually killed.
For that you may either need to then make some core modding or make a timer with 0ms delay with BasicEvent for the player who died and resurrect him when the timed event fires. (fires on next update call)
And just check the areaIDs etc before doing anything ofc.
that'd be a bad thing for PVP i have added a script for that before and it just broke the PVP .... you might want to teleport the player to a graveyard before resurecting