for K,k in pairs(Navigation:GetChildren())do if k:IsA("\084\101\120\116\066\117\116\116\111\110")then k.MouseButton1Click:connect(function()local K local W local A=k.Name if A~=CurrentFrame and not Tweening then for K,W in pairs(Navigation:GetChildren())do if W:IsA("\084\101\120\116\066\117\116\116\111\110")then W.Style=W==k and Enum.ButtonStyle.RobloxRoundDefaultButton or Enum.ButtonStyle.RobloxRoundButton end end Tweening=true ChangeAction(EquipButton,.1)for k,d in pairs(NavOrder)do if d==CurrentFrame then K=k elseif d==A then W=k end end local d=W>K and true or false local T=d and UDim2.new(-1,0,0,0)or UDim2.new(1,0,0)local L=d and UDim2.new(1,0,0,0)or UDim2.new(-1,0,0,0)Main[A].Position=L Main[CurrentFrame]:TweenPosition(T,Direction,Style,Time,false)Main[A]:TweenPosition(UDim2.new(0,0,0,0),Direction,Style,Time,false)CurrentFrame=A 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)
-- Navigation

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)
