-- argument handling args = {...} tInput = tostring(args[1]) tSecond = tostring(args[2]) -- find monitor local monitor = peripheral.find("monitor") -- prepare monitor monitor.setBackgroundcolor(colors.purple) monitor.setTextColor(colors.cyan) monitor.clear() monitor.setCursorPos(1, 1) monitor.setTextScale(2) monSize = monitor.getSize() while monSize[1] < tInput do tScale = tScale - 0.1 monitor.setTextScale(tScale) print("trying ", tostring(tScale)) end monCenterX = monSize[1] / 2 monCenterY = monSize[2] / 2 if tSecond then while monSize[2] < tSecond do tScale = tScale - 0.1 monitor.setTextScale(tScale) print("trying ", tostring(tScale)) end -- two lines -- line one prep monitor.setCursorPos(monCenterX - #tInput, monCenterY - 1) -- write monitor.write(tInput) -- line two prep monitor.setCursorPos(monCenterX - #tSecond, monCenterY) -- write monitor.write(tSecond) else -- single line prep monitor.setCursorPos(monCenterX - #tInput, monCenterY) end monitor.write()