Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local program = "tree"
- local text = "Press S to stop!"
- local ready = true
- parallel.waitForAll(
- function ()
- while ready do
- shell.run(program)
- end
- end,
- function ()
- while ready do
- local event, key = os.pullEvent("key")
- if key==31 then
- ready=false
- print("Stopping...")
- shell.exit()
- --elseif key== /MOUSE RIGHT CLICK/ then print(text)
- else
- print(text)
- end
- end
- end
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement