local G local z=camera.CFrame local function o()character=player.Character rootPart=character.PrimaryPart or character:WaitForChild("\072\117\109\097\110\111\105\100\082\111\111\116\080\097\114\116")humanoid=character:FindFirstChildWhichIsA("\072\117\109\097\110\111\105\100")z=camera.CFrame end local function a()for G,z in ipairs(subCategoryFrames)do z.Visible=false end end local function C(G)for G,z in next,activeCategoryButtons do z:SetSelected(false)end if activeCategoryButtons[G]then activeCategoryButtons[G]:SetSelected(true)end end local function E(G)for G,z in next,activeSubCategoryButtons do z:SetSelected(false)end if activeSubCategoryButtons[G]then activeSubCategoryButtons[G]:SetSelected(true)end end local function c()scrollingFrame.CanvasSize=UDim2.new(0,0,0,scrollingFrameUIGridLayout.AbsoluteContentSize.Y)end local function j()scaleFrame.CanvasSize=UDim2.new(0,0,0,scaleFrameUIGridLayout.AbsoluteContentSize.Y)end local function i()searchTextBox.Text=""end local function r()activeButtons:DoCleaning()i()scrollingFrame.CanvasPosition=Vector2.new(0,0)end

local wearingAssets

local originalCamCFrame = camera.CFrame

local function characterAdded()
	character = player.Character
	rootPart = character.PrimaryPart or character:WaitForChild("HumanoidRootPart")
	humanoid = character:FindFirstChildWhichIsA("Humanoid")
	originalCamCFrame = camera.CFrame
end

local function hideAllSubCategoryFrames()
	for i, frame in ipairs(subCategoryFrames) do
		frame.Visible = false
	end
end

local function setSelectedCategory(guiButton)
	for button, class in next, activeCategoryButtons do
		class:SetSelected(false)
	end
	if activeCategoryButtons[guiButton] then
		activeCategoryButtons[guiButton]:SetSelected(true)
	end
end

local function setSelectedSubCategory(guiButton)
	for button, class in next, activeSubCategoryButtons do
		class:SetSelected(false)
	end
	if activeSubCategoryButtons[guiButton] then
		activeSubCategoryButtons[guiButton]:SetSelected(true)
	end
end

local function updateScrollingFrameCanvasSize()
	scrollingFrame.CanvasSize = UDim2.new(0, 0, 0, scrollingFrameUIGridLayout.AbsoluteContentSize.Y)
end

local function updateScaleFrameCanvasSize()
	scaleFrame.CanvasSize = UDim2.new(0, 0, 0, scaleFrameUIGridLayout.AbsoluteContentSize.Y)
end

local function clearSearch()
	searchTextBox.Text = ""
end

local function resetScrollingFrame()
	activeButtons:DoCleaning()
	clearSearch()
	scrollingFrame.CanvasPosition = Vector2.new(0, 0)
end
