xXm0dzXx

wrote in 30 seconds for my friend

Aug 18th, 2013
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.21 KB | None | 0 0
  1. local x, y = term.getSize()
  2. local m = peripheral.wrap("bottom")
  3.  
  4. local bgColor = colours.black
  5. local txtColor = colours.white
  6.  
  7. local txt = ""
  8. local txtSize = 1
  9.  
  10. local selection = 1
  11.  
  12. term.clear()
  13.  
  14. function x( num )
  15. if num == selection then
  16. write("[x] ")
  17. else
  18. write("[ ] ")
  19. end
  20. end
  21.  
  22. function draw()
  23. term.setCursorPos(1,1)
  24. term.clear()
  25.  
  26. m.setTextScale(txtSize)
  27. m.setTextColor(txtColor)
  28. m.setBackgroundColor(bgColor)
  29. m.clear()
  30. m.setCursorPos(1,1)
  31. m.write(txt)
  32.  
  33. x(1)
  34. print("Set Text")
  35.  
  36. x(2)
  37. print("Set Size")
  38.  
  39. x(3)
  40. print("Set Background Color")
  41.  
  42. x(4)
  43. print("Set Text Color")
  44.  
  45. x(5)
  46. print("set YOUR MOM LOLLOLOLOLOLOLO")
  47.  
  48. end
  49.  
  50. while true do
  51. draw()
  52. local event, key = os.pullEvent("key")
  53.  
  54. if key == keys.up then
  55. if selection ~= 1 then
  56. selection = selection -1
  57. end
  58. elseif key == keys.down then
  59. if selection ~= 5 then
  60. selection = selection +1
  61. end
  62. elseif key == keys.enter then
  63. if selection == 1 then
  64. term.clear()
  65. term.setCursorPos(1,1)
  66. write("Enter yo text: ")
  67. txt = read()
  68.  
  69. write("DAT TEXT IS OVAH ")
  70. textutils.slowPrint("900000000!!!!!")
  71.  
  72. sleep(1)
  73. elseif selection == 2 then
  74. term.clear()
  75. term.setCursorPos(1,1)
  76. print("Pick a number from 1-5!")
  77. size = tonumber(read())
  78.  
  79. if size >= 1 and size <= 5 then
  80. txtSize = size
  81. print("dat number is gay... oh wel")
  82. else
  83. print("YOUR NUMBER IS INVALIDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD")
  84. end
  85.  
  86. sleep(1)
  87. elseif selection == 3 then
  88. term.clear()
  89. term.setCursorPos(1,1)
  90. write("Enter a color: ")
  91. color = colours[ read() ]
  92.  
  93. if color == nil then
  94. print("INVALID COLOR!!!!!!!!!!!!!!!!!!!!!!!!!")
  95. else
  96. bgColor = color
  97. print("Color set!")
  98. end
  99. sleep(1)
  100. elseif selection == 4 then
  101. term.clear()
  102. term.setCursorPos(1,1)
  103. write("Enter a color: ")
  104. color = colours[ read() ]
  105.  
  106. if color == nil then
  107. print("INVALID COLOR!!!!!!!!!!!!!!!!!!!!!!!!!")
  108. else
  109. txtColor = color
  110. print("Color set!")
  111. end
  112. sleep(1)
  113. elseif selection == 5 then
  114. for i = 1,18 do
  115. textutils.slowPrint("YOURMOM!!!!!!!!!!!!!!!!!!!")
  116. end
  117. end
  118. end
  119. end
Advertisement
Add Comment
Please, Sign In to add comment