Proximity.Triggered:Connect(function(t)if open==false then open=true OpenSound:Play()Proximity.ActionText="\067\108\111\115\101"for t=1,20,1 do Proximity.MaxActivationDistance=0 script.Parent.Parent:SetPrimaryPartCFrame(PrimaryPart.CFrame*CFrame.Angles(0,math.rad(5),0))wait()Proximity.MaxActivationDistance=10 end else open=false CloseSound:Play()Proximity.ActionText="\079\112\101\110"for t=1,20,1 do Proximity.MaxActivationDistance=0 script.Parent.Parent:SetPrimaryPartCFrame(PrimaryPart.CFrame*CFrame.Angles(0,math.rad(-5),0))wait()Proximity.MaxActivationDistance=10 end end end)

Proximity.Triggered:Connect(function(Players)
	
	
	if open == false then
		open = true
		OpenSound:Play()
		Proximity.ActionText = "Close"
		for i = 1, 20 do 
			Proximity.MaxActivationDistance = 0
			script.Parent.Parent:SetPrimaryPartCFrame(PrimaryPart.CFrame*CFrame.Angles(0, math.rad(5), 0))
			wait()
			Proximity.MaxActivationDistance = 10
		end
	else
		open = false
		CloseSound:Play()
		Proximity.ActionText = "Open"
		for i = 1, 20 do
			Proximity.MaxActivationDistance = 0
			script.Parent.Parent:SetPrimaryPartCFrame(PrimaryPart.CFrame*CFrame.Angles(0, math.rad(-5), 0))
			wait()
			Proximity.MaxActivationDistance = 10
		end
	end
	
end)


