module.SetCanvasSize=function(R)local U,m,A=getSizes()local H=R.UIGridLayout local P=R.AbsoluteSize local J=U*P J=UDim2.new(0,J.X,0,J.Y)local S=m*P S=UDim2.new(0,S.X,0,S.Y)H.CellPadding=J H.CellSize=S local i=R:GetChildren()local s=R.AbsoluteSize.Y local O=H.CellSize.Y.Offset local C=H.CellPadding.Y.Offset H.FillDirectionMaxCells=A local x=math.ceil((#i-1)/H.FillDirectionMaxCells)local L=x*O+(x-1)*C R.CanvasSize=UDim2.new(0,0,0,L+5)end function module.Int(R)((game:GetService("\087\111\114\107\115\112\097\099\101")).CurrentCamera:GetPropertyChangedSignal("\086\105\101\119\112\111\114\116\083\105\122\101")):Connect(function()delay(.5,function()module.SetCanvasSize(skillShopUI.Skills)end)end)end return module

module.SetCanvasSize = function(ScrollingFrame)
	local PADDING,SIZE,MaxCells = getSizes()
	local UIGridLayout = ScrollingFrame.UIGridLayout
	local AbsoluteSize = ScrollingFrame.AbsoluteSize

    local NewPadding = PADDING * AbsoluteSize
    NewPadding = UDim2.new(0, NewPadding .X, 0, NewPadding .Y)
    local NewSize = SIZE * AbsoluteSize
    NewSize = UDim2.new(0, NewSize.X, 0, NewSize.Y)

    UIGridLayout.CellPadding = NewPadding
    UIGridLayout.CellSize = NewSize

	local items = ScrollingFrame:GetChildren()
	local frameSizeY = ScrollingFrame.AbsoluteSize.Y
	local ySize = UIGridLayout.CellSize.Y.Offset
	local yPadding = UIGridLayout.CellPadding.Y.Offset
	UIGridLayout.FillDirectionMaxCells = MaxCells
	local rows = math.ceil((#items-1)/UIGridLayout.FillDirectionMaxCells)
	local pixels = rows*ySize + (rows-1)*yPadding
	ScrollingFrame.CanvasSize = UDim2.new(0, 0, 0, (pixels + 5))
end

function module:Int()
	game:GetService("Workspace").CurrentCamera:GetPropertyChangedSignal("ViewportSize"):Connect(function()
		delay(.5, function() module.SetCanvasSize(skillShopUI.Skills) end)
	end)
end

return module
