Advertisement
Guest User

startup

a guest
Oct 20th, 2014
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.47 KB | None | 0 0
  1. mon = peripheral.wrap("back")
  2.  
  3. mon.setCursorPos(1,3)
  4. mon.setBackgroundColor(colors.blue)
  5. mon.setTextScale(2.5)
  6. mon.clear()
  7.  
  8. function center (text)
  9.   x, y = mon.getSize()
  10.   x1, y1 = mon.getCursorPos()
  11.   mon.setCursorPos((math.floor(x/2) - (math.floor(#text/2))+1), y1)
  12.   mon.write(text)
  13. end
  14.  
  15. center("Welcome to Dusty's")
  16. mon.setCursorPos(1,4)
  17. center("There is a lot")
  18. mon.setCursorPos(1,5)
  19. center("of great offers")
  20. mon.setCursorPos(1,6)
  21. center("all the times")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement