module.SetCanvasSize=function(w)local z,y,o=getSizes()local c=w.UIGridLayout local D=w.AbsoluteSize local N=z*D N=UDim2.new(0,N.X,0,N.Y)local t=y*D t=UDim2.new(0,t.X,0,t.Y)c.CellPadding=N c.CellSize=t local L=getItems(w)local H=w.AbsoluteSize.Y local F=c.CellSize.Y.Offset local G=c.CellPadding.Y.Offset c.FillDirectionMaxCells=o local J=math.ceil((L-1)/c.FillDirectionMaxCells)local h=J*F+(J-1)*G w.CanvasSize=UDim2.new(0,0,0,h+5)end local w=script.Parent.Parent.Parent.Parent.Parent:WaitForChild("\109\097\105\110")local z=w.WeaponShop function module.Int(w)((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(z.Storage.Swords)module.SetCanvasSize(z.Storage.Robot)module.SetCanvasSize(z.Storage.Storage)end)end)end return module
-- Set Pet Canvas Size --
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 = getItems(ScrollingFrame) --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

local main = script.Parent.Parent.Parent.Parent.Parent:WaitForChild("main")
local weaponShopUI = main.WeaponShop

function module:Int()
	game:GetService("Workspace").CurrentCamera:GetPropertyChangedSignal("ViewportSize"):Connect(function()
		delay(0.5, function()
			module.SetCanvasSize(weaponShopUI.Storage.Swords)
			module.SetCanvasSize(weaponShopUI.Storage.Robot)
			module.SetCanvasSize(weaponShopUI.Storage.Storage)
		end)
	end)
end

return module
