Advertisement
Guest User

Untitled

a guest
Feb 11th, 2016
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.50 KB | None | 0 0
  1. os.loadAPI("button")
  2. m = peripheral.wrap("top")
  3. o = "back"
  4. gre = false
  5. lib = false
  6. bro = false
  7. yel = false
  8. pur = false
  9. pin = true
  10. lig = true
  11. mag = false
  12. ora = false
  13. whi = false
  14. m.clear()
  15.  
  16. function fillTable()
  17. button.setTable("Auto Spawner", green, 2,17,5,7)
  18. button.setTable("Witch", lightblue, 2,17,9,11)
  19. button.setTable("Zombie", brown, 2,17,13,15)
  20. button.setTable("Blaze", yellow, 22,37,5,7)
  21. button.setTable("Villager", purple, 22,37,9,11)
  22. button.setTable("Off", turnoff, 15,24,2,4)
  23. button.setTable("<- Door", doorleft, 1,10,1,3)
  24. button.setTable("Door ->", doorright, 29,39,1,3)
  25. button.setTable("Wither Skeleton", magenta, 22,37,13,15)
  26. button.setTable("Pink Slime", white, 2,17,17,19)
  27. button.setTable("Light", orange, 15,25,21,23)
  28. button.screen()
  29. end
  30.  
  31. function getClick()
  32. event,side,x,y = os.pullEvent("monitor_touch")
  33. button.checkxy(x,y)
  34. end
  35.  
  36. function turnoff()
  37. button.flash("Off")
  38. if gre then
  39. button.toggleButton("Auto Spawner")
  40. rs.setBundledOutput(o,colors.subtract(rs.getBundledOutput(o),colors.green))
  41. gre = false
  42. end
  43. if lib then
  44. button.toggleButton("Witch")
  45. rs.setBundledOutput(o,colors.subtract(rs.getBundledOutput(o),colors.lightBlue))
  46. lib = false
  47. end
  48. if bro then
  49. button.toggleButton("Zombie")
  50. rs.setBundledOutput(o,colors.subtract(rs.getBundledOutput(o),colors.brown))
  51. bro = false
  52. end
  53. if yel then
  54. button.toggleButton("Blaze")
  55. rs.setBundledOutput(o,colors.subtract(rs.getBundledOutput(o),colors.yellow))
  56. yel = false
  57. end
  58. if pur then
  59. button.toggleButton("Villager")
  60. rs.setBundledOutput(o,colors.subtract(rs.getBundledOutput(o),colors.purple))
  61. pur = false
  62. end
  63. if mag then
  64. button.toggleButton("Wither Skeleton")
  65. rs.setBundledOutput(o,colors.subtract(rs.getBundledOutput(o),colors.magenta))
  66. mag = false
  67. end
  68. if whi then
  69. button.toggleButton("Pink Slime")
  70. rs.setBundledOutput(o,colors.subtract(rs.getBundledOutput(o),colors.white))
  71. whi = false
  72. end
  73. end
  74.  
  75. function doorleft()
  76. if pin then
  77. print("pink is now inactive")
  78. rs.setBundledOutput(o,colors.subtract(rs.getBundledOutput(o),colors.pink))
  79. else
  80. print("pink is now active")
  81. rs.setBundledOutput(o,colors.combine(rs.getBundledOutput(o),colors.pink))
  82. end
  83. button.toggleButton("<- Door")
  84. pin = not pin
  85. end
  86.  
  87. function doorright()
  88. if lig then
  89. print("lightGray is now inactive")
  90. rs.setBundledOutput(o,colors.subtract(rs.getBundledOutput(o),colors.lightGray))
  91. else
  92. print("lightGray is now active")
  93. rs.setBundledOutput(o,colors.combine(rs.getBundledOutput(o),colors.lightGray))
  94. end
  95. button.toggleButton("Door ->")
  96. lig = not lig
  97. end
  98.  
  99. function green()
  100. if gre then
  101. print("green is now inactive")
  102. rs.setBundledOutput(o,colors.subtract(rs.getBundledOutput(o),colors.green))
  103. else
  104. print("green is now active")
  105. rs.setBundledOutput(o,colors.combine(rs.getBundledOutput(o),colors.green))
  106. end
  107. button.toggleButton("Auto Spawner")
  108. gre = not gre
  109. end
  110.  
  111. function lightblue()
  112. if lib then
  113. print("light blue is now inactive")
  114. rs.setBundledOutput(o,colors.subtract(rs.getBundledOutput(o),colors.lightBlue))
  115. else
  116. print("light blue is now active")
  117. rs.setBundledOutput(o,colors.combine(rs.getBundledOutput(o),colors.lightBlue))
  118. end
  119. button.toggleButton("Witch")
  120. lib = not lib
  121. end
  122.  
  123. function brown()
  124. if bro then
  125. print("brown is now inactive")
  126. rs.setBundledOutput(o,colors.subtract(rs.getBundledOutput(o),colors.brown))
  127. else
  128. print("brown is now active")
  129. rs.setBundledOutput(o,colors.combine(rs.getBundledOutput(o),colors.brown))
  130. end
  131. button.toggleButton("Zombie")
  132. bro = not bro
  133. end
  134.  
  135. function yellow()
  136. if yel then
  137. print("yellow is now inactive")
  138. rs.setBundledOutput(o,colors.subtract(rs.getBundledOutput(o),colors.yellow))
  139. else
  140. print("yellow is now active")
  141. rs.setBundledOutput(o,colors.combine(rs.getBundledOutput(o),colors.yellow))
  142. end
  143. button.toggleButton("Blaze")
  144. yel = not yel
  145. end
  146.  
  147. function purple()
  148. if pur then
  149. print("purple is now inactive")
  150. rs.setBundledOutput(o,colors.subtract(rs.getBundledOutput(o),colors.purple))
  151. else
  152. print("purple is now active")
  153. rs.setBundledOutput(o,colors.combine(rs.getBundledOutput(o),colors.purple))
  154. end
  155. button.toggleButton("Villager")
  156. pur = not pur
  157. end
  158.  
  159. function magenta()
  160. if mag then
  161. print("magenta is now inactive")
  162. rs.setBundledOutput(o,colors.subtract(rs.getBundledOutput(o),colors.magenta))
  163. else
  164. print("magenta is now active")
  165. rs.setBundledOutput(o,colors.combine(rs.getBundledOutput(o),colors.magenta))
  166. end
  167. button.toggleButton("Wither Skeleton")
  168. mag = not mag
  169. end
  170.  
  171. function orange()
  172. if ora then
  173. print("orange is now inactive")
  174. rs.setBundledOutput(o,colors.subtract(rs.getBundledOutput(o),colors.orange))
  175. else
  176. print("orange is now active")
  177. rs.setBundledOutput(o,colors.combine(rs.getBundledOutput(o),colors.orange))
  178. end
  179. button.toggleButton("Light")
  180. ora = not ora
  181. end
  182.  
  183. function white()
  184. if whi then
  185. print("white is now inactive")
  186. rs.setBundledOutput(o,colors.subtract(rs.getBundledOutput(o),colors.white))
  187. else
  188. print("white is now active")
  189. rs.setBundledOutput(o,colors.combine(rs.getBundledOutput(o),colors.white))
  190. end
  191. button.toggleButton("Pink Slime")
  192. whi = not whi
  193. end
  194.  
  195. fillTable()
  196. button.heading("Spawning Control")
  197. rs.setBundledOutput(o,320)
  198. button.toggleButton("Door ->")
  199. button.toggleButton("<- Door")
  200. button.label(2,22,"Cursed Room:")
  201.  
  202. while true do
  203. getClick()
  204. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement