TechManDylan

MyButton

Jan 19th, 2021 (edited)
387
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. os.loadAPI("button")
  2.  
  3. function startTurtle()
  4.     redstone.setOutput("top", true)
  5.     sleep(1)
  6.     redstone.setOutput("top", false)
  7. end
  8.  
  9. myMonitor = peripheral.find("monitor")
  10.  
  11. myMonitor.setCursorPos(3, 3)
  12. myMonitor.write("Turtle Farmer")
  13. myMonitor.setCursorPos(7, 5)
  14. myMonitor.write("Deluxe")
  15.  
  16.  
  17.  
  18. button.setMonitor(myMonitor)
  19. testButton = button.create("Go")
  20. testButton.setPos(6,14)
  21. testButton.setSize(8, 3)
  22. testButton.onClick(function() startTurtle() end)
  23. while true do button.await(testButton)end
  24.  
  25.  
  26.  
  27.  
RAW Paste Data