local function died()
target = nil
attacking = false
newTarget = nil
searchParts = nil
searchingForTargets = false
Zombie.heartbeatConnection:Disconnect()
Zombie.humanoidRootPart.Anchored = true
Zombie.deathAnimation:Play()
wait(Zombie.deathAnimation.Length * 0.65)
Zombie.deathAnimation:Stop()
Zombie.humanoidRootPart.Anchored = false
if RAGDOLL_ENABLED then
Ragdoll(Zombie.instance, Zombie.humanoid)
end
if DESTROY_ON_DEATH then
delay(DEATH_DESTROY_DELAY, function()
destroy()
end)
end
end
Do you want the entire script? It’s like 500 lines