local T={}local s=script.Parent local b=game:GetService("\084\119\101\101\110\083\101\114\118\105\099\101")local k=TweenInfo.new(6,Enum.EasingStyle.Linear,Enum.EasingDirection.Out)local p=0 local C=false function T.Pay()if p>0 then p=p+20 return end while C do wait(1)end p=20 openGate()while p>0 do wait(1)p=p-1 end closeGate()end local Y=b:Create(s,k,{CFrame=s.CFrame*CFrame.new(0,36,0)})function openGate()s.Close:Play()wait(2)s.Open:Play()Y:Play()wait(6)s.Close:Play()end local n=b:Create(s,k,{CFrame=s.CFrame})function closeGate()s.Close:Play()wait(2)s.Open:Play()n:Play()C=true wait(6)C=false s.Close:Play()end return T


local v1 = {};
local l__Parent__2 = script.Parent;
local l__TweenService__3 = game:GetService("TweenService");
local v4 = TweenInfo.new(6, Enum.EasingStyle.Linear, Enum.EasingDirection.Out);
local u1 = 0;
local u2 = false;
function v1.Pay()
	if u1 > 0 then
		u1 = u1 + 20;
		return;
	end;
	while u2 do
		wait(1);	
	end;
	u1 = 20;
	openGate();
	while u1 > 0 do
		wait(1);
		u1 = u1 - 1;	
	end;
	closeGate();
end;
local u3 = l__TweenService__3:Create(l__Parent__2, v4, {
	CFrame = l__Parent__2.CFrame * CFrame.new(0, 36, 0)
});
function openGate()
	l__Parent__2.Close:Play();
	wait(2);
	l__Parent__2.Open:Play();
	u3:Play();
	wait(6);
	l__Parent__2.Close:Play();
end;
local u4 = l__TweenService__3:Create(l__Parent__2, v4, {
	CFrame = l__Parent__2.CFrame
});
function closeGate()
	l__Parent__2.Close:Play();
	wait(2);
	l__Parent__2.Open:Play();
	u4:Play();
	u2 = true;
	wait(6);
	u2 = false;
	l__Parent__2.Close:Play();
end;
return v1;
