SHOW:
|
|
- or go back to the newest paste.
| 1 | - | function centerText(text, y, color) |
| 1 | + | function centerText = (text, y, color) |
| 2 | -- mon.clear() | |
| 3 | mX = mon.getSize() | |
| 4 | x = math.floor(mX/2) - math.floor(string.len(text)/2) | |
| 5 | - | mon.setCursorPos(x, y) |
| 5 | + | mon.setCursorPos(1, 1) |
| 6 | mon.setTextColor(color) | |
| 7 | mon.write(text) | |
| 8 | end | |
| 9 | ||
| 10 | mon = peripheral.wrap("right")
| |
| 11 | - | mon.setTextScale(0.5) |
| 11 | + | mon.setTextScale(1) |
| 12 | mon.setBackgroundColor(colors.blue) | |
| 13 | -- mon.clear() | |
| 14 | - | centerText("Warning", 1,16384)
|
| 14 | + | centerText("Welcome To Ben Co.")
|
| 15 | - | centerText("--------------", 2,1)
|
| 15 | + | centerText("See the Time Above")
|
| 16 | - | centerText("Be aware of Golems and Turrets", 3,1)
|
| 16 | + | centerText("Don't Take Anything")
|
| 17 | - | centerText("They will kill any player who enters the room", 4,1)
|
| 17 | + | centerText("To See Nyancat Contact Ben Lillie")
|
| 18 | - | centerText("Anything you lose wont be given back.", 5,1)
|
| 18 | + | centerText("Have A Good Day") |