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.74 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.  
  7. function button1() button.toggleButton("Alarm")
  8.   message = 1
  9.   rednet.send(10, message)
  10.   redstone.setOutput("back", true)
  11.   sleep(1)
  12.     button.toggleButton("Alarm")
  13.   m.clear()
  14. end
  15.  
  16. function button2() button.toggleButton("2")
  17.   print("kikoo")
  18.   sleep(2)
  19.   button.toggleButton("2")
  20. end
  21.  
  22. function ecran()
  23.   button.setTable("Alarm",button1,2,6,3,3)
  24.   button.setTable("2",button2,12,25,6,6)
  25.   button.screen()
  26. end
  27.  
  28. function getClick()
  29.   envent,side,x,y = os.pullEvent("monitor_touch")
  30.   button.checkxy(x,y)
  31. end
  32.  
  33. ecran()
  34.  
  35. while true do
  36.  getClick()
  37.  
  38.   if redstone.getInput("top", true) then
  39.   shell.run("txt")
  40.   end
  41. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement