SHOW:
|
|
- or go back to the newest paste.
| 1 | while true do | |
| 2 | mon = peripheral.wrap("back")
| |
| 3 | term.redirect(mon) | |
| 4 | mon.clear() | |
| 5 | - | mon.setTextScale(1) |
| 5 | + | |
| 6 | - | mon.setTextColor(8) |
| 6 | + | local function centerText(text) |
| 7 | - | mon.setCursorPos(10,4) |
| 7 | + | local x,y = term.getSize() |
| 8 | - | print("WELCOME!")
|
| 8 | + | local x2,y2 = term.getCursorPos() |
| 9 | - | mon.setCursorPos(6,6) |
| 9 | + | term.setCursorPos(math.ceil((x / 2) - (text:len() / 2)), y2) |
| 10 | - | print("Server by s3ptum")
|
| 10 | + | write(text) |
| 11 | - | mon.setTextScale(1) |
| 11 | + | end |
| 12 | - | mon.setCursorPos(1,9) |
| 12 | + | |
| 13 | - | print("1.No Griefing")
|
| 13 | + | centerText("Hello World")
|
| 14 | - | mon.setCursorPos(1,11) |
| 14 | + | |
| 15 | - | print("2.No Spamming")
|
| 15 | + | |
| 16 | - | mon.setCursorPos(1,13) |
| 16 | + |