Returning camera to normal

I have a script when a player sits down the camera gets attached to a part and a renderstepped runs so the camer afollows the mouse to look appeasing, however im having trouble returning this to normal once the character died, ive already tried disconnecting it when it detects a char death but it doest work here is the code

local plr = game.Players.LocalPlayer
local char = plr.Character or plr.CharacterAdded:wait()
local hum = char:WaitForChild("Humanoid")
local hrp = char:WaitForChild("HumanoidRootPart")
local uis = game:GetService("UserInputService")
local cam = workspace.CurrentCamera
local mouse = game:GetService("Players").LocalPlayer:GetMouse()
local dark = game.ReplicatedStorage.Skies["Dark night"]
local light = game.Lighting
local candle = game.workspace.Table.Candle
local cc = cam.CFrame
print(cc)
hum:GetPropertyChangedSignal("Sit"):Connect(function()
	if hum.Sit == true then
		print("Sitting")
		local camPart = Instance.new("Part")
		camPart.Transparency = 1
		camPart.CanCollide = false
		camPart.Anchored = true
		camPart.CFrame = hrp.CFrame + Vector3.new(-.5,2)
		camPart.Name = "camPart"
		camPart.Parent = char
		for i, v in pairs(char:GetChildren()) do
			if v.ClassName == "Accessory" then
				if v.AccessoryType == Enum.AccessoryType.Neck or Enum.AccessoryType.Face or Enum.AccessoryType.Hair then
					v:Destroy()
				end
			end
		end
		char.Head.Transparency = 1
		
		local playerGui = plr:WaitForChild("PlayerGui")

		local screenGui = Instance.new("ScreenGui")
		screenGui.IgnoreGuiInset = true
		screenGui.Parent = playerGui
		local textLabel = Instance.new("TextLabel")
		textLabel.Size = UDim2.new(1, 0, 1, 0)
		textLabel.BackgroundColor3 = Color3.fromRGB(16, 16, 16)
		textLabel.Font = Enum.Font.Merriweather
		textLabel.TextColor3 = Color3.new(0.819608, 0.819608, 0.819608)
		textLabel.Text = ""
		textLabel.TextSize = 40
		textLabel.Parent = screenGui
		camPart.Parent = workspace
		hum.JumpHeight = 0
		game.Lighting.Brightness = 0
		repeat
			wait()
			cam.CameraType = Enum.CameraType.Scriptable
		until
		cam.CameraType == Enum.CameraType.Scriptable

		--// Move cam
		local maxTilt = 40
		local camemath = game:GetService("RunService").RenderStepped:Connect(function()
			cam.CFrame = camPart.CFrame * CFrame.Angles(
				math.rad((((mouse.Y - mouse.ViewSizeY / 2) / mouse.ViewSizeY)) * -maxTilt),
				math.rad((((mouse.X - mouse.ViewSizeX / 2) / mouse.ViewSizeX)) * -maxTilt),
				0
			)
		end)
		print(cc)
		light.TimeOfDay = "04:00:00"
		light.Sky:Destroy()
		local clone = dark:Clone()
		clone.Parent = light
		candle.Flame.ParticleEmitter.Enabled = true
		candle.Flame.PointLight.Enabled = true
		for i = 1,100  do
			textLabel.BackgroundTransparency += 0.01
			wait(0.01)
		end
		hum.Died:Connect(function()
			camemath:Disconnect()
			if char:FindFirstChild("camPart") then
				char.camPart:Destroy()
				cam.CameraType = Enum.CameraType.Custom
			end
		end)
	end
end)```