Advertisement
Guest User

Untitled

a guest
Jul 27th, 2015
226
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.22 KB | None | 0 0
  1. function centerText(text, y, color)
  2. --mon.clear()
  3. mX = mon.getSize()
  4. --print(mX)
  5. x = ((mX/2)+1) - (math.floor(string.len(text))/2)
  6. mon.setCursorPos(x, y)
  7. mon.setTextColor(color)
  8. mon.write(text)
  9. end
  10.  
  11. mon = peripheral.wrap("back")
  12. mon.setTextScale(2)
  13. mon.setBackgroundColor(colors.cyan)
  14. centerText("Server Rules",1,colors.gray)
  15. centerText("FP Rules & Regulations",3,colors.white)
  16. centerText("*Taking from others is never allowed",4,colors.white)
  17. centerText("on our server. Even if it is unprotected.",5,colors.white)
  18. centerText("under the Market section",6,colors.white)
  19. centerText("2:Ask Chewie,for a shop! ",7, colors.white)
  20. centerText("If not online,MSG me!",8, colors.white)
  21. centerText("",11, colors. orange)
  22. centerText("",10, colors. orange)
  23. --centerText("123456789123456", 2,colors.blue)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement