if script.Parent.Parent.Parent.IsOn.Value then script.Parent.Parent:TweenPosition(UDim2.new(0,0,0,0),Enum.EasingDirection.InOut,Enum.EasingStyle.Quad,1,true)end script.Parent.Parent.Parent.IsOn.Changed:connect(function()if script.Parent.Parent.Parent.IsOn.Value then script.Parent.Parent:TweenPosition(UDim2.new(0,0,0,0),Enum.EasingDirection.InOut,Enum.EasingStyle.Quad,1,true)end end)script.Parent.MouseButton1Click:connect(function()if hinge.DesiredAngle==0 then sound.SoundId="\114\098\120\097\115\115\101\116\105\100\058\047\047\050\055\056\051\050\057\054\051\056"sound:Play()wait(.4)hinge.DesiredAngle=-0.75 else hinge.DesiredAngle=0 sound.SoundId="\114\098\120\097\115\115\101\116\105\100\058\047\047\050\055\056\051\050\057\054\051\056"sound:Play()end end)
---
if script.Parent.Parent.Parent.IsOn.Value then
	script.Parent.Parent:TweenPosition(
		UDim2.new(0, 0, 0, 0),
		Enum.EasingDirection.InOut,
		Enum.EasingStyle.Quad,
		1,
		true
	)
end

script.Parent.Parent.Parent.IsOn.Changed:connect(function()
	if script.Parent.Parent.Parent.IsOn.Value then
		script.Parent.Parent:TweenPosition(
			UDim2.new(0, 0, 0, 0),
			Enum.EasingDirection.InOut,
			Enum.EasingStyle.Quad,
			1,
			true
		)
	end
end)

script.Parent.MouseButton1Click:connect(function()
	if hinge.DesiredAngle == 0 then
		sound.SoundId = "rbxassetid://278329638"
		sound:Play()
		wait(0.4)
		hinge.DesiredAngle = -0.75
	else
		hinge.DesiredAngle = 0
		sound.SoundId = "rbxassetid://278329638"
		sound:Play()
	end
end)
