Advertisement
Guest User

stop.lua

a guest
Apr 6th, 2020
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.25 KB | None | 0 0
  1. local userInput = ""
  2. local event = ""
  3. local stop = true
  4.  
  5. while stop do
  6. event, userInput = os.pullEvent("char")
  7. userInput = string.upper(userInput)
  8. print(userInput)
  9.  
  10. if userInput == "S" then
  11. stop=false
  12. print("Program is stopping.")
  13. end
  14. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement