function onClick()
	script.Parent.Sound:Play()
	wait(1)
	script.Parent.Parent.Door1.Open:Play()
	local dr1 = script.Parent.Parent.Door1
	local dr2 = script.Parent.Parent.Door2
	if script.Parent.Parent.IsOpening.Value == false and script.Parent.Parent.IsOpened.Value == false then
		script.Parent.Parent.IsOpening.Value = true
		for i = 1, 22 do
			wait(0.01)
			dr1.CFrame = dr1.CFrame * CFrame.new(-0.08, 0, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0)
			dr2.CFrame = dr2.CFrame * CFrame.new(0.08, 0, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0)
			script.Parent.Parent.IsOpened.Value = true
			script.Parent.Parent.IsOpening.Value = false
		end
	end
end

script.Parent.ClickDetector.MouseClick:connect(onClick)


function onClick()
	script.Parent.Sound:Play()
	wait(1)
	script.Parent.Parent.Door1.Open:Play()
	local dr1 = script.Parent.Parent.Door1
	local dr2 = script.Parent.Parent.Door2
	if script.Parent.Parent.IsOpening.Value == false and script.Parent.Parent.IsOpened.Value == true then
		script.Parent.Parent.IsOpening.Value = true
		for i = 1, 22 do
			wait(0.01)
			dr1.CFrame = dr1.CFrame * CFrame.new(0.08, 0, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0)
			dr2.CFrame = dr2.CFrame * CFrame.new(-0.08, 0, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0)
			script.Parent.Parent.IsOpened.Value = false
			script.Parent.Parent.IsOpening.Value = false
		end
	end
end

script.Parent.ClickDetector.MouseClick:connect(onClick)