TheSommer

Screen

Feb 27th, 2013
8,612
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.17 KB | None | 0 0
  1. local function centerText(text)
  2.   x,y = term.getSize()
  3.   x1,y1 = term.getCursorPos()
  4.   term.setCursorPos((math.floor(x/2) - (math.floor(#text/2))), y1)
  5.   term.write(text)
  6. end
Advertisement
Add Comment
Please, Sign In to add comment