local h=script.Parent.Parent.Parent.Outputs.DoorOpen function MoveDoor(h)local n=game:GetService("\084\119\101\101\110\083\101\114\118\105\099\101")local i=TweenInfo.new(2.5,Enum.EasingStyle.Sine,Enum.EasingDirection.InOut)local o=n:Create(script.Parent.Door.Hinge.HingeConstraint,i,{TargetAngle=h})o:Play()end h.Changed:Connect(function(h)wait(.5)if script.Parent.Parent.Parent.Outputs.DoorOpen.Value==false then MoveDoor(0)return end if h then MoveDoor(90)else MoveDoor(0)end end)
--[[ 
strings-override
Theta Technologies 2021
eFlex Next Generation
It's all at the door...
]]

local doorvalue = script.Parent.Parent.Parent.Outputs.DoorOpen

function MoveDoor(angle)
	local tweenservice = game:GetService("TweenService")
	local tweeninfo = TweenInfo.new(2.5, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut)
	local tween = tweenservice:Create(script.Parent.Door.Hinge.HingeConstraint, tweeninfo, { TargetAngle = angle })
	tween:Play()
end

doorvalue.Changed:Connect(function(newdoorvalue)
	wait(0.5)
	if script.Parent.Parent.Parent.Outputs.DoorOpen.Value == false then
		MoveDoor(0)
		return
	end
	if newdoorvalue then
		MoveDoor(90)
	else
		MoveDoor(0)
	end
end)
