Guest User

control

a guest
Oct 23rd, 2015
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.81 KB | None | 0 0
  1. term.clear()
  2. term.setCursorPos(1,1)
  3.  
  4. print("Base Control")
  5. term.setCursorPos(1,2)
  6. print("Version 1.0")
  7.  
  8. input = read()
  9.  
  10. farms = "farm"
  11. power - "power"
  12.  
  13. if input == (farm) then
  14. term.clear()
  15. term.setCursorPos(1,1)
  16. print("Do You want to turn the Farms Off?")
  17.  
  18. input = read()
  19.  
  20. yes = "yes"
  21. no = "no"
  22.  
  23. if input == (yes) then
  24. print("Well alrighty!")
  25. redstone.setOutput("back", true)
  26. end
  27.  
  28. if input == (no) then
  29. print("Ok, I will still be here.")
  30. sleep(3)
  31. os.reboot()
  32. end
  33.  
  34. if input == (power) then
  35. print("Do you want to turn the power on or off?")
  36.  
  37. input = read()
  38.  
  39. on = "on"
  40. off = "off"
  41.  
  42. if input == (on) then
  43. print("Power is going on!")
  44. redstone.setOutput("top", false)
  45. end
  46.  
  47. if input == (off) then
  48. print("Power turning of!")
  49. redstone.setOutput("top", true)
  50. sleep(1)
  51. os.reboot()
  52. end
  53. end
Advertisement
Add Comment
Please, Sign In to add comment