Advertisement
Aidan428

util

Nov 9th, 2020
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.04 KB | None | 0 0
  1. while true do
  2.  
  3. function Menu()
  4. term.setBackgroundColor(colors.white)
  5. term.setTextColor(colors.blue)
  6. term.clear()
  7. term.setCursorPos(1, 1)
  8. print("Spalding Utility Management Systems v1.0")
  9. sleep(2)
  10. term.setTextColor(colours.red)
  11. print("If you require help, type 'help'")
  12. term.setTextColor(colours.black)
  13. write("Please enter command: ")
  14. choice = read()
  15. end
  16.  
  17.  
  18.  
  19.  
  20.  
  21. Menu()
  22.  
  23. if choice == "dump" then
  24. print("Water dumping now in progress")
  25. redstone.setOutput("back" , true)
  26. sleep(2)
  27. end
  28.  
  29. if choice == "stop dump" then
  30. print("Stopping dumping process")
  31. redstone.setOutput("back", false)
  32. sleep(2)
  33. end
  34.  
  35. if choice == "help" then
  36. print("Commands include: ")
  37. print("dump")
  38. print("stop dump")
  39. print("exit")
  40. print("help")
  41. term.setBackgroundColor(colours.red)
  42. print("Press any key to continue")
  43. os.pullEvent("key")
  44. end
  45.  
  46. if choice == "exit" then
  47. term.setBackgroundColor(colors.black)
  48. term.setTextColor(colours.white)
  49. term.clear()
  50. term.setCursorPos(1, 1)
  51. break
  52. end
  53.  
  54. end
  55.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement