Advertisement
Guest User

startup

a guest
Dec 20th, 2014
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.28 KB | None | 0 0
  1. m = peripheral.wrap("top")
  2. m.clear()
  3. m.setCursorPos(1,1)
  4.  
  5. local function centerText(text)
  6.   x,y = m.getSize()
  7.   x1,y1 = m.getCursorPos()
  8.   m.setCursorPos((math.floor(x/2) - (math.floor(#text/2))), y1)
  9.   m.write(text)  
  10. end
  11.  
  12. --Call function "centerText("")" to set text
  13. --Use m.setCursorPos(1,y) to choose placement on screen
  14. m.setCursorPos(21,1)
  15. m.setTextColor(colors.red)
  16. m.write("  Rules!")
  17.  
  18. y2 = 3
  19. m.setCursorPos(1, y2 + 1)
  20. m.setTextColor(colors.lightBlue)
  21. centerText("1.)No Surface Mining.")
  22.  
  23. m.setCursorPos(1, y2 + 3)
  24. m.setTextColor(colors.lime)
  25. centerText("2.)Be Respectful To All Staff Members.")
  26.  
  27.  
  28. m.setCursorPos(1, y2 + 5)
  29. m.setTextColor(colors.yellow)
  30. centerText("3.)Please Don't Be Rude To Other's.")
  31.  
  32.  
  33. m.setCursorPos(1, y2 + 7)
  34. m.setTextColor(colors.green)
  35. centerText("4.)No Sexual Harassment.")
  36.  
  37.  
  38. m.setCursorPos(1, y2 + 9)
  39. m.setTextColor(colors.purple)
  40. centerText("5.)Use Your Common Sense")
  41.  
  42.  
  43. m.setCursorPos(1, y2 + 11)
  44. m.setTextColor(colors.white)
  45. centerText("5.)Be Ethical.")
  46.  
  47.  
  48. m.setCursorPos(1, y2 + 13)
  49. m.setTextColor(colors.blue)
  50. centerText("6.)No Advertising")
  51.  
  52.  
  53. m.setCursorPos(1, y2 + 15)
  54. m.setTextColor(colors.orange)
  55. centerText("Failure To Follow These Rules Will,")
  56.  
  57.  
  58. m.setCursorPos(1, y2 + 17)
  59. centerText("Result In Your Ban")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement