local zombie = script.Parent
local debounce = false
local HumanoidRootPart = zombie.HumanoidRootPart
local attack = zombie.Humanoid.Animator:LoadAnimation(script.Attack)
HumanoidRootPart.Touched:Connect(function(part)
local humanoid = part.Parent:WaitForChild("Humanoid")
if humanoid and debounce ~= true and part.Name ~= "Hitbox" and game.Players:GetPlayerFromCharacter(part.Parent) then
humanoid:TakeDamage(50)
game.ReplicatedStorage.Variables.Variable2 = zombie.Name
local explosion = Instance.new("Explosion")
explosion.Position = zombie["Gas TankAccessory"].Handle.Position
explosion.BlastPressure = 10000
explosion.DestroyJointRadiusPercent = 0
for i, v in pairs(zombie:GetChildren()) do
if v.Name == "HumanoidRootPart" then
v:Destroy()
end
for i, v in pairs(v:GetChildren()) do
v:Destroy()
end
end
explosion.Parent = workspace
explosion.Visible = true
wait(5)
zombie:Destroy()
debounce = true
wait(1)
debounce = false
end
end)