help on making my poison zombie torso npc

I am trying to make it drop a ragdoll headcrab or live headcrab, or keep the headcrab bodygroup on the model depending on where you shoot it, the same way zombie torso does it but i dont know at all how
Zombie torso seems to do it like if you shoot it in the head with magnum or shutgun or just explode the torso it will drop ragdoll headcrab
if you crossbow it or crowbar it or something
it keeps the headcrab bodygroup on the model
and if you shoot it with shotgun or magnum in the body or otherwise anywhere but the head
it drops a live headcrab
How do i do this
And im kinda a begginner
also, im not meaning drop headcrab or keep it on model randomelly
im asking how to do it the same way zombie torso does it
depending on where you shoot it

have a look at http://forum.facepunch.com/showthread.php?t=868641 maybe you can alert it to spawn a headcrab and not a weapon

he had been permbanned already for spamming the same thread, not putting any effort into anything - besides robotboy gave him already the script, and making alts to spam the question more.

Why are people even trying to help this theif?