AdventurousMR

Monitor Text

Oct 3rd, 2021 (edited)
265
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.23 KB | None | 0 0
  1. local w,h = term.getSize()
  2.  
  3. function printCentered (y,s)
  4.     local x = math.floor((w - string.len(s)) / 2)
  5.     term.setCursorPos(x , y)
  6.     term.clearLine()
  7.     term.write(s)
  8. end
  9.  
  10. printCentered(math.floor(h/2) - 2, "Screens")
Add Comment
Please, Sign In to add comment