// Script by Zippy_Zolton. Contact me on Discord - Zolton#4312

addHook("BossThinker", function(mo)
if not (mo.valid and mo.health != 0) return end
// Fang gets his own song :D
	if mo.type == MT_FANG and mo.health == mo.info.damage and mo.pinchmusic != true
		P_StartQuake(9*FRACUNIT, 30)
		S_StartSound(nil, sfx_kc67)
		S_ChangeMusic("PNFANG", true)
		mo.pinchmusic = true
// Anti-Shrimp plays it on his final attack
	elseif mo.type == MT_EGGMOBILE and mo.health == 3 and mo.pinchmusic != true
		P_StartQuake(9*FRACUNIT, 30)
		S_StartSound(nil, sfx_kc67)
		S_ChangeMusic("VSEGG2", true)
		mo.pinchmusic = true
// generic function if all else fails
	elseif (mo.health == mo.info.damage or (mo.health == 3 and mo.info.damage == 0)) and mo.pinchmusic != true and mo.type != MT_EGGMOBILE
		P_StartQuake(9*FRACUNIT, 30)
		S_StartSound(nil, sfx_kc67)
		S_ChangeMusic("VSEGG2", true)
		mo.pinchmusic = true
	end
end)