Advertisement
TheBlueKingLP

startup

Feb 15th, 2016 (edited)
27
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.37 KB | None | 0 0
  1. os.loadAPI("btn")
  2. m = peripheral.wrap("left")
  3.  
  4. m.setTextScale(0.5)
  5.  
  6. while true do
  7. m.setBackgroundColor(colors.black)
  8. m.clear()
  9. m.setCursorPos(1,1)
  10. m.setTextColor(colors.lime)
  11. m.write("Enter Password")
  12. term.redirect(m)
  13. paintutils.drawLine(4,2,12,2,colors.red)
  14. paintutils.drawLine(4,2,4,8,colors.red)
  15. paintutils.drawLine(12,2,12,8,colors.red)
  16. paintutils.drawLine(4,9,12,9,colors.red)
  17. m.setBackgroundColor(colors.red)
  18. m.setTextColor(colors.white)
  19.  
  20. function fillTable()
  21. btn.setTable("1", one, 6,6,4,4)
  22. btn.setTable("2", two, 8,8,4,4)
  23. btn.setTable("3", tre, 10,10,4,4)
  24. btn.setTable("4", four, 6,6,5,5)
  25. btn.setTable("5", five, 8,8,5,5)
  26. btn.setTable("6", six, 10,10,5,5)
  27. btn.setTable("7", sev, 6,6,6,6)
  28. btn.setTable("8", eit, 8,8,6,6)
  29. btn.setTable("9", nin, 10,10,6,6)
  30. btn.setTable("Reset", Reset, 5,11,8,8)
  31. btn.screen()
  32. end
  33.  
  34. function getClick()
  35. event,side,x,y = os.pullEvent("monitor_touch")
  36. btn.checkxy(x,y)
  37. end
  38.  
  39. function one()
  40. btn.flash("1")
  41. num1 = 1
  42. end
  43.  
  44. function two()
  45. btn.flash("2")
  46. num1 = 2
  47. end
  48.  
  49. function tre()
  50. btn.flash("3")
  51. num1 = 3
  52. end
  53.  
  54. function four()
  55. btn.flash("4")
  56. num1 = 4
  57. end
  58.  
  59. function five()
  60. btn.flash("5")
  61. num1 = 5
  62. end
  63.  
  64. function six()
  65. btn.flash("6")
  66. num1 = 6
  67. end
  68.  
  69. function sev()
  70. btn.flash("7")
  71. num1 = 7
  72. end
  73.  
  74. function eit()
  75. btn.flash("8")
  76. num1 = 8
  77. end
  78.  
  79. function nin()
  80. btn.flash("9")
  81. num1 = 9
  82. end
  83.  
  84. function Reset()
  85. btn.flash("Reset")
  86. os.reboot()
  87. end
  88.  
  89. fillTable()
  90.  
  91. getClick()
  92.  
  93.  
  94. function one()
  95. btn.flash("1")
  96. num2 = 1
  97. end
  98.  
  99. function two()
  100. btn.flash("2")
  101. num2 = 2
  102. end
  103.  
  104. function tre()
  105. btn.flash("3")
  106. num2 = 3
  107. end
  108.  
  109. function four()
  110. btn.flash("4")
  111. num2 = 4
  112. end
  113.  
  114. function five()
  115. btn.flash("5")
  116. num2 = 5
  117. end
  118.  
  119. function six()
  120. btn.flash("6")
  121. num2 = 6
  122. end
  123.  
  124. function sev()
  125. btn.flash("7")
  126. num2 = 7
  127. end
  128.  
  129. function eit()
  130. btn.flash("8")
  131. num2 = 8
  132. end
  133.  
  134. function nin()
  135. btn.flash("9")
  136. num2 = 9
  137. end
  138.  
  139. function Reset()
  140. btn.flash("Reset")
  141. os.reboot()
  142. end
  143.  
  144. fillTable()
  145.  
  146. getClick()
  147.  
  148. function one()
  149. btn.flash("1")
  150. num3 = 1
  151. end
  152.  
  153. function two()
  154. btn.flash("2")
  155. num3 = 2
  156. end
  157.  
  158. function tre()
  159. btn.flash("3")
  160. num3 = 3
  161. end
  162.  
  163. function four()
  164. btn.flash("4")
  165. num3 = 4
  166. end
  167.  
  168. function five()
  169. btn.flash("5")
  170. num3 = 5
  171. end
  172.  
  173. function six()
  174. btn.flash("6")
  175. num3 = 6
  176. end
  177.  
  178. function sev()
  179. btn.flash("7")
  180. num3 = 7
  181. end
  182.  
  183. function eit()
  184. btn.flash("8")
  185. num3 = 8
  186. end
  187.  
  188. function nin()
  189. btn.flash("9")
  190. num3 = 9
  191. end
  192.  
  193. function Reset()
  194. btn.flash("Reset")
  195. os.reboot()
  196. end
  197.  
  198. fillTable()
  199.  
  200. getClick()
  201.  
  202. function one()
  203. btn.flash("1")
  204. num4 = 1
  205. end
  206.  
  207. function two()
  208. btn.flash("2")
  209. num4 = 2
  210. end
  211.  
  212. function tre()
  213. btn.flash("3")
  214. num4 = 3
  215. end
  216.  
  217. function four()
  218. btn.flash("4")
  219. num4 = 4
  220. end
  221.  
  222. function five()
  223. btn.flash("5")
  224. num4 = 5
  225. end
  226.  
  227. function six()
  228. btn.flash("6")
  229. num4 = 6
  230. end
  231.  
  232. function sev()
  233. btn.flash("7")
  234. num4 = 7
  235. end
  236.  
  237. function eit()
  238. btn.flash("8")
  239. num4 = 8
  240. end
  241.  
  242. function nin()
  243. btn.flash("9")
  244. num4 = 9
  245. end
  246.  
  247. function Reset()
  248. btn.flash("Reset")
  249. os.reboot()
  250. end
  251.  
  252. fillTable()
  253.  
  254. getClick()
  255.  
  256.  
  257. if num1 == 1 and num2 == 2 and num3 == 3 and num4 == 4 then -- change your password here
  258. rs.setOutput("bottom", true)
  259. sleep(4)
  260. rs.setOutput("bottom", false)
  261.  
  262. else
  263.  
  264. rs.setOutput("top", true)
  265. sleep(0.1)
  266. rs.setOutput("top", false)
  267. end
  268.  
  269.  
  270. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement