Advertisement
Guest User

startup

a guest
Oct 20th, 2014
183
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.50 KB | None | 0 0
  1. mon = peripheral.wrap("back")
  2.  
  3. mon.setCursorPos(1,2)
  4. mon.setBackgroundColor(colors.cyan)
  5. mon.setTextScale(2)
  6. mon.setTextColor(colors.black)
  7. mon.clear()
  8.  
  9. function center (text)
  10.   x, y = mon.getSize()
  11.   x1, y1 = mon.getCursorPos()
  12.   mon.setCursorPos((math.floor(x/2) - (math.floor(#text/2))+1), y1)
  13.   mon.write(text)
  14. end
  15.  
  16. center("Welcome to Retro's")
  17. mon.setCursorPos(1,3)
  18. center("I sell everything")
  19. mon.setCursorPos(1,4)
  20. center("at great prices.")
  21. mon.setCursorPos(1,5)
  22. center("Have a nice day")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement