Bone/Hitbox Triggering on an NPC

How do I tell an NPC to change bodygroup when a certain hitbox or bone (bodypart) is hit by a bullet?

The second parameter given by the hook will give you the hit group.