Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function centerText(text)
- local x,y =term.getSize()
- local x2,y2 = term.getCursorPos()
- term.setCursorPos(math.ceil((x/2) - (text:len() / 2)), y2)
- print(text)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement