for A,O in pairs(Navigation:GetChildren())do if O:IsA("\084\101\120\116\066\117\116\116\111\110")then O.MouseButton1Click:connect(function()local A local s local W=O.Name if W~=CurrentFrame and not Tweening then for A,s in pairs(Navigation:GetChildren())do if s:IsA("\084\101\120\116\066\117\116\116\111\110")then s.Style=s==O and Enum.ButtonStyle.RobloxRoundDefaultButton or Enum.ButtonStyle.RobloxRoundButton end end Tweening=true ChangeAction(EquipButton,.1)for O,q in pairs(NavOrder)do if q==CurrentFrame then A=O elseif q==W then s=O end end local q=s>A and true or false local U=q and UDim2.new(-1,0,0,0)or UDim2.new(1,0,0)local P=q and UDim2.new(1,0,0,0)or UDim2.new(-1,0,0,0)Main[W].Position=P Main[CurrentFrame]:TweenPosition(U,Direction,Style,Time,false)Main[W]:TweenPosition(UDim2.new(0,0,0,0),Direction,Style,Time,false)CurrentFrame=W wait(Time)Tweening=false end end)end end Dock.Inventory.MouseButton1Click:connect(function()if GameGUI.Processing.Visible or GameGUI.CaseOpen.Visible then return end GameGUI.ChangeGameMode.Visible=false GameGUI.Radio.Visible=false InventoryFrame.Visible=not InventoryFrame.Visible GameGUI.Crafting.Visible=false GameGUI.Santa.Visible=false end)Dock.Shop.MouseButton1Click:connect(function()InventoryFrame.Visible=false GameGUI.Crafting.Visible=false GameGUI.Santa.Visible=false end)


for _,NavButton in pairs(Navigation:GetChildren()) do
	if NavButton:IsA("TextButton") then
		NavButton.MouseButton1Click:connect(function()
			local CurrentIndex;
			local NextIndex;
			local NextFrame = NavButton.Name;
			
			if NextFrame ~= CurrentFrame and not Tweening then
				for _,Button in pairs(Navigation:GetChildren()) do if Button:IsA("TextButton") then Button.Style = (Button==NavButton and Enum.ButtonStyle.RobloxRoundDefaultButton) or Enum.ButtonStyle.RobloxRoundButton; end; end;
				Tweening = true;
				ChangeAction(EquipButton,0.1);
				for Index,Frame in pairs(NavOrder) do if Frame == CurrentFrame then CurrentIndex = Index; elseif Frame == NextFrame then NextIndex = Index; end; end;
				local Forward = (NextIndex>CurrentIndex and true) or false;
				local CurrentFrameTweenPosition = (Forward and UDim2.new(-1,0,0,0)) or UDim2.new(1,0,0);
				local NextFramePosition = (Forward and UDim2.new(1,0,0,0)) or UDim2.new(-1,0,0,0);
				Main[NextFrame].Position = NextFramePosition;
				Main[CurrentFrame]:TweenPosition(CurrentFrameTweenPosition,Direction,Style,Time,false);
				Main[NextFrame]:TweenPosition(UDim2.new(0,0,0,0),Direction,Style,Time,false);
				CurrentFrame = NextFrame;
				wait(Time);
				Tweening = false;
			end;
			
		end)
	end;
end

Dock.Inventory.MouseButton1Click:connect(function()
	if GameGUI.Processing.Visible or GameGUI.CaseOpen.Visible then return; end;
	GameGUI.ChangeGameMode.Visible = false;
	GameGUI.Radio.Visible = false;
	InventoryFrame.Visible = not InventoryFrame.Visible;
	GameGUI.Crafting.Visible = false;
	GameGUI.Santa.Visible = false;
end)

Dock.Shop.MouseButton1Click:connect(function()
	InventoryFrame.Visible = false;
	GameGUI.Crafting.Visible = false;
	GameGUI.Santa.Visible = false;
end)
