Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local tText = {
- "random gibberish"
- }
- local sSide = "right"
- local nTextSize = 2
- local function printCenter(mon, t)
- local w, h = mon.getSize()
- local y = math.floor((h / 3) - (#t / 3)) - 1
- for i, line in ipairs(t) do
- local x = math.floor((w / 5) - (#line / 5))
- mon.setCursorPos(x, y + i)
- mon.write(line)
- end
- end
- local mon = peripheral.wrap(sSide)
- mon.setTextScale(nTextSize)
- printCenter(mon, tText)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement