Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local side = "right"
- local leave = "y"
- local stay = "n"
- local opentime = 5
- while true do
- term.clear()
- term.setCursorPos(1,1)
- write("Welcome to Steele Industries.")
- term.setCursorPos(1,2)
- write("Do you wish to leave the factory floor?")
- term.setCursorPos(1,3)
- write("Y/N:")
- local input = read()
- if input == leave then
- term.clear()
- term.setCursorPos(1,1)
- print("Request accepted. Have a nice day.")
- rs.setOutput(side,true)
- sleep(opentime)
- rs.setOutput(side,false)
- else
- if input == stay then
- print("Stop wasting my time.")
- sleep(2)
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement