module.SetPetCanvasSize=function()local P,O,Q=getSizes()local G=ScrollingFrame.AbsoluteSize local v=P*G v=UDim2.new(0,v.X,0,v.Y)local T=O*G T=UDim2.new(0,T.X,0,T.Y)UIGridLayout.CellPadding=v UIGridLayout.CellSize=T local n=ScrollingFrame:GetChildren()local j=ScrollingFrame.AbsoluteSize.Y local U=UIGridLayout.CellSize.Y.Offset local a=UIGridLayout.CellPadding.Y.Offset UIGridLayout.FillDirectionMaxCells=Q local x=math.ceil((#n-1)/UIGridLayout.FillDirectionMaxCells)local F=x*U+(x-1)*a ScrollingFrame.CanvasSize=UDim2.new(0,0,0,F+5)end function module.Int(P)((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.SetPetCanvasSize()end)end)end return module
-- Set Pet Canvas Size --
module.SetPetCanvasSize = function()
	local PADDING, SIZE, MaxCells = getSizes()
	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(0.5, function()
			module.SetPetCanvasSize()
		end)
	end)
end

return module
