--local HighLight = char:WaitForChild("PLayerHighLight")

function deathCheck(health)
	if health <= 0 and dead == false then
		dead = true
		char.HumanoidRootPart.Anchored = true
		deathAnim:Play()
		wait(2.5)
		hum.BreakJointsOnDeath = true
		wait(0.5)
		char.HumanoidRootPart.Anchored = false
	
		script:Destroy()
	end
end

hum.HealthChanged:Connect(deathCheck)

