Advertisement
Guest User

startup

a guest
Oct 20th, 2014
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.78 KB | None | 0 0
  1. os.loadAPI("button")
  2. m = peripheral.wrap("left")
  3. m.clear()
  4. rednet.open("right")
  5. m.setTextScale(1,5)
  6. while false do
  7. if redstone.getOutput("top") == false then
  8.   white("lol")
  9. else
  10.   shell.run("txt")
  11. end
  12. end
  13.  
  14. function button1() button.toggleButton("Alarm")
  15.   message = 1
  16.   rednet.send(10, message)
  17.   redstone.setOutput("back", true)
  18.   sleep(1)
  19.     button.toggleButton("Alarm")
  20.   m.clear()
  21. end
  22.  
  23. function button2() button.toggleButton("2")
  24.   print("kikoo")
  25.   sleep(2)
  26.   button.toggleButton("2")
  27. end
  28.  
  29. function ecran()
  30.   button.setTable("Alarm",button1,2,6,3,3)
  31.   button.setTable("2",button2,12,25,6,6)
  32.   button.screen()
  33. end
  34.  
  35. function getClick()
  36.   envent,side,x,y = os.pullEvent("monitor_touch")
  37.   button.checkxy(x,y)
  38. end
  39.  
  40. ecran()
  41.  
  42. while true do
  43.  getClick()
  44. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement