-- Navigation 

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
