for k,u in pairs(Navigation.Main:GetChildren())do if u:IsA("\084\101\120\116\066\117\116\116\111\110")then u.MouseButton1Click:connect(function()if not Tweening then Tweening=true Navigation:TweenPosition(UDim2.new(-1,0,0,0),Direction,Style,Time)Main[u.Name]:TweenPosition(UDim2.new(0,0,0,0),Direction,Style,Time)wait(Time)Tweening=false end end)end end for k,u in pairs(Main:GetChildren())do u.Back.MouseButton1Click:connect(function()if not Tweening then Tweening=true Navigation:TweenPosition(UDim2.new(0,0,0,0),Direction,Style,Time)Main[u.Name]:TweenPosition(UDim2.new(1,0,0,0),Direction,Style,Time)wait(Time)Tweening=false end end)end

for _,NavButton in pairs(Navigation.Main:GetChildren()) do
	if NavButton:IsA("TextButton") then
		NavButton.MouseButton1Click:connect(function()
			if not Tweening then
				Tweening = true;
				Navigation:TweenPosition(UDim2.new(-1,0,0,0),Direction,Style,Time);
				Main[NavButton.Name]:TweenPosition(UDim2.new(0,0,0,0),Direction,Style,Time);
				wait(Time);
				Tweening = false;
			end;
		end)
	end;
end

for _,Frame in pairs(Main:GetChildren()) do
	Frame.Back.MouseButton1Click:connect(function()
		if not Tweening then
			Tweening = true;
			Navigation:TweenPosition(UDim2.new(0,0,0,0),Direction,Style,Time);
			Main[Frame.Name]:TweenPosition(UDim2.new(1,0,0,0),Direction,Style,Time);
			wait(Time);
			Tweening = false;
		end;
	end)
end
