Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local term = require("term")
- local function exitProgram() -- a function which exits the program when the letter "e" is entered.
- local a, b, c, d = event.pull(60, "key_down")
- if string.char(c) == "e" then
- term.clear()
- term.setCursor(1,1)
- io.write("Exitting!\n")
- os.sleep(1)
- os.exit()
- else
- os.sleep(60)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement