--//Toggle event//--

script.Parent.Button1.ClickDetector.MouseClick:Connect(function()
	if DoorStatus == "Closed" and Debounce == false then
		Debounce = true
		Door.Button1.Click:Play()
		DoorMain.Sound:Play()
		Open()
		wait(1)
		DoorStatus = "Opened"
		Debounce = false
	elseif DoorStatus == "Opened" and Debounce == false then
		Debounce = true
		Door.Button1.Click:Play()
		DoorMain.Sound:Play()
		Close()
		wait(1)
		DoorStatus = "Closed"
		Debounce = false
	end
end)

script.Parent.Button2.ClickDetector.MouseClick:Connect(function()
	if DoorStatus == "Closed" and Debounce == false then
		Debounce = true
		Door.Button2.Click:Play()
		DoorMain.Sound:Play()
		Open()
		wait(1)
		DoorStatus = "Opened"
		Debounce = false
	elseif DoorStatus == "Opened" and Debounce == false then
		Debounce = true
		Door.Button2.Click:Play()
		DoorMain.Sound:Play()
		Close()
		wait(1)
		DoorStatus = "Closed"
		Debounce = false
	end
	end)
