Advertisement
fantadada

Test_03

Apr 30th, 2020
649
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.43 KB | None | 0 0
  1. os.loadAPI("Button")
  2. rednet.open("left")
  3. m = peripheral.wrap("top")
  4. m.clear()
  5.  
  6.  
  7.  
  8. function button1() Button.toggleButton("Ouvrir")
  9. rednet.broadcast("1")
  10. sleep(2)
  11. button.toggleButton("Ouvrir")
  12.  end
  13.  
  14.  
  15. function ecran()
  16. Button.setTable("Ouvrir",button1,1,7,2,4)
  17. Button.screen()
  18. end
  19.  
  20. function getClick()
  21. event,side,x,y = os.pullEvent("monitor_touch")
  22. Button.checkxy(x,y)
  23. end
  24.  
  25. ecran()
  26.  
  27. while true do getClick() end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement