Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- while true do
- function Menu()
- term.setBackgroundColor(colors.white)
- term.setTextColor(colors.blue)
- term.clear()
- term.setCursorPos(1, 1)
- print("Spalding Utility Management Systems v1.0")
- sleep(2)
- term.setTextColor(colours.red)
- print("If you require help, type 'help'")
- term.setTextColor(colours.black)
- write("Please enter command: ")
- choice = read()
- end
- Menu()
- if choice == "dump" then
- print("Water dumping now in progress")
- redstone.setOutput("back" , true)
- sleep(2)
- end
- if choice == "stop dump" then
- print("Stopping dumping process")
- redstone.setOutput("back", false)
- sleep(2)
- end
- if choice == "help" then
- print("Commands include: ")
- print("dump")
- print("stop dump")
- print("exit")
- print("help")
- term.setBackgroundColor(colours.red)
- print("Press any key to continue")
- os.pullEvent("key")
- end
- if choice == "exit" then
- term.setBackgroundColor(colors.black)
- term.setTextColor(colours.white)
- term.clear()
- term.setCursorPos(1, 1)
- break
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement