local C=script.Parent local F=C.Torso local l for C,F in pairs(C:GetChildren())do if F:IsA("\072\117\109\097\110\111\105\100")then l=F end end if l then l.Died:Connect(function()wait(.0001);(F:FindFirstChild("\100\101\097\100")):Play()end)else warn("\067\097\110\110\111\116 \102\105\110\100 \072\117\109\097\110\111\105\100 \105\110 \068\101\097\116\104\083\111\117\110\100 \083\099\114\105\112\116\033")end


local NPC = script.Parent
local Head = NPC.Torso
local Humanoid
for i,v in pairs(NPC:GetChildren()) do 
	if v:IsA('Humanoid') then 
		Humanoid = v 
	end 
end

if Humanoid then
	Humanoid.Died:Connect(function()
		wait(0.0001)
		Head:FindFirstChild("dead"):Play()
	end)
else
	warn('Cannot find Humanoid in DeathSound Script!')
end
