function Window.UpdateWindowHeight(y)local c=0 for y,T in pairs(Gui:GetChildren())do if T:IsA("\071\117\105\079\098\106\101\099\116")then c=c+1 end end local T=c*LINE_HEIGHT+20 Gui.CanvasSize=UDim2.new(Gui.CanvasSize.X.Scale,Gui.CanvasSize.X.Offset,0,T)Gui.Size=UDim2.new(Gui.Size.X.Scale,Gui.Size.X.Offset,0,T>WINDOW_MAX_HEIGHT and WINDOW_MAX_HEIGHT or T)Gui.CanvasPosition=Vector2.new(0,math.clamp(T-300,0,math.huge))end
--- Recalculate the window height
function Window:UpdateWindowHeight()
	local numLines = 0

	for _, child in pairs(Gui:GetChildren()) do
		if child:IsA("GuiObject") then
			numLines = numLines + 1
		end
	end

	local windowHeight = (numLines * LINE_HEIGHT) + 20

	Gui.CanvasSize = UDim2.new(Gui.CanvasSize.X.Scale, Gui.CanvasSize.X.Offset, 0, windowHeight)
	Gui.Size = UDim2.new(
		Gui.Size.X.Scale,
		Gui.Size.X.Offset,
		0,
		windowHeight > WINDOW_MAX_HEIGHT and WINDOW_MAX_HEIGHT or windowHeight
	)

	Gui.CanvasPosition = Vector2.new(0, math.clamp(windowHeight - 300, 0, math.huge))
end
