local q=NumberSlider.new(function(q,p)remoteEvent:FireServer("\115\099\097\108\101","\066\111\100\121\072\101\105\103\104\116\083\099\097\108\101",q)end,scaleFrame.Height,90,105,true)local p=NumberSlider.new(function(q,p)remoteEvent:FireServer("\115\099\097\108\101","\066\111\100\121\087\105\100\116\104\083\099\097\108\101",q)end,scaleFrame.Width,70,100,true)local t=NumberSlider.new(function(q,p)remoteEvent:FireServer("\115\099\097\108\101","\072\101\097\100\083\099\097\108\101",q)end,scaleFrame.Head,95,100,true)local a=NumberSlider.new(function(q,p)remoteEvent:FireServer("\115\099\097\108\101","\066\111\100\121\080\114\111\112\111\114\116\105\111\110\083\099\097\108\101",q)end,scaleFrame.Proportion,0,100,true)local E=NumberSlider.new(function(q,p)remoteEvent:FireServer("\115\099\097\108\101","\066\111\100\121\084\121\112\101\083\099\097\108\101",q)end,scaleFrame.BodyType,0,100,true)avatarEditorFrame.Visible=false catalogFrameCloseTween:Play()viewerFrameCloseTween:Play()do local q=pcall(function()wearingAssets=Players:GetCharacterAppearanceInfoAsync(player.UserId)end)if not q then print("\102\097\105\108\101\100 \116\111 \108\111\097\100")end end loadAccessories(currentSubCategory)updateScaleFrameCanvasSize()q:Set(wearingAssets.scales.height*100)p:Set(wearingAssets.scales.width*100)t:Set(wearingAssets.scales.head*100)a:Set(wearingAssets.scales.proportion*100)E:Set(wearingAssets.scales.bodyType*100)clearSearchButton.Activated:Connect(clearSearch);(searchTextBox:GetPropertyChangedSignal("\084\101\120\116")):Connect(search)player.CharacterAdded:Connect(characterAdded)toggleButton.Activated:Connect(toggle)viewButton.Activated:Connect(toggleView)doneButton.Activated:Connect(closeSequence)remoteEvent.OnClientEvent:Connect(onClientEvent);(scaleFrameUIGridLayout:GetPropertyChangedSignal("\065\098\115\111\108\117\116\101\067\111\110\116\101\110\116\083\105\122\101")):Connect(updateScaleFrameCanvasSize)

local heightSliderFrame = NumberSlider.new(function(newValue, oldValue)
	remoteEvent:FireServer("scale", "BodyHeightScale", newValue)
end, scaleFrame.Height, 90, 105, true)

local widthSliderFrame = NumberSlider.new(function(newValue, oldValue)
	remoteEvent:FireServer("scale", "BodyWidthScale", newValue)
end, scaleFrame.Width, 70, 100, true)

local headSliderFrame = NumberSlider.new(function(newValue, oldValue)
	remoteEvent:FireServer("scale", "HeadScale", newValue)
end, scaleFrame.Head, 95, 100, true)

local proportionSliderFrame = NumberSlider.new(function(newValue, oldValue)
	remoteEvent:FireServer("scale", "BodyProportionScale", newValue)
end, scaleFrame.Proportion, 0, 100, true)

local bodySliderFrame = NumberSlider.new(function(newValue, oldValue)
	remoteEvent:FireServer("scale", "BodyTypeScale", newValue)
end, scaleFrame.BodyType, 0, 100, true)

avatarEditorFrame.Visible = false
catalogFrameCloseTween:Play()
viewerFrameCloseTween:Play()

do
	local success = pcall(function()
		wearingAssets = Players:GetCharacterAppearanceInfoAsync(player.UserId)
	end)
	if not success then
		print("failed to load")
	end
end

loadAccessories(currentSubCategory)
updateScaleFrameCanvasSize()

heightSliderFrame:Set(wearingAssets.scales.height * 100)
widthSliderFrame:Set(wearingAssets.scales.width * 100)
headSliderFrame:Set(wearingAssets.scales.head * 100)
proportionSliderFrame:Set(wearingAssets.scales.proportion * 100)
bodySliderFrame:Set(wearingAssets.scales.bodyType * 100)

clearSearchButton.Activated:Connect(clearSearch)
searchTextBox:GetPropertyChangedSignal("Text"):Connect(search)
player.CharacterAdded:Connect(characterAdded)
toggleButton.Activated:Connect(toggle)
viewButton.Activated:Connect(toggleView)
doneButton.Activated:Connect(closeSequence)
remoteEvent.OnClientEvent:Connect(onClientEvent)
scaleFrameUIGridLayout:GetPropertyChangedSignal("AbsoluteContentSize"):Connect(updateScaleFrameCanvasSize)










