Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function write_center(text)
- local x, y = term.getCursorPos()
- local width, height = term.getSize()
- term.setCursorPos(math.floor((width - #text) / 2) + 1, y)
- term.write(text)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement