Advertisement
PeachGaming

Untitled

Jun 13th, 2017
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. local function writeCentered( text )
  2. local x, y = term.getSize()
  3. local centerYPos = y / 2
  4. local centerXStartingPos = ( x - string.len(text) ) / 2
  5. term.setCursorPos( centerXStartingPos, centerYPos )
  6.  
  7. write( text )
  8.  
  9. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement