Unlike other games, in KF2, kills/assists matter very little.
To answer your question, the one who last damaged the zed before it died (that means fell to the ground etc) will get the kill. A zed whose head has been removed is not dead until it actually falls.
That being said, don't let it bother you if you remove a scrake's head, but someone else unloads all their 9mm ammo into it anyway. Both of you will get the same money and xp, regardless of who shot first/last.
Also, I would recommend unloading 1 bullet into a zed before it dies, if you weren't shooting it before its head was removed. This allows for easy xp and money gain
Example: SWAT player unloads half a clip into a scrake, you were fighting other zeds, you see the scrake's head get destroyed, so now you shoot it once (any weapon) so that you also get money and xp. This does not affect anything other than the kill/assist count (refer to the first line of my answer)