local L=script.Parent local a=L.Head local h for L,a in pairs(L:GetChildren())do if a:IsA("\072\117\109\097\110\111\105\100")then h=a end end if h then h.Died:Connect(function()wait(.0001);(a:FindFirstChild("\100\105\101\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
--SeregaTopYTReal2
--Put the "died" sound to npc's head

local NPC = script.Parent
local Head = NPC.Head
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("died"):Play()
	end)
else
	warn("Cannot find Humanoid in DeathSound Script!")
end
