Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function centerText(text, y, color)
- -- mon.clear
- mx = mon.getSize()
- x = math.floor(mx/2) - math.floor(string.len(text)/2)
- mon.setCursorPos(x, y)
- mon.setTextColor(color)
- mon.write(text)
- end
- mon = peripheral.wrap("bottom")
- mon.setTextScale(1.4)
- mon.setBackgroundColor(colors.black)
- -- mon.clear()
- centerText("---------", 1, 16384)
- centerText("---------", 1, 16)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement