console.keyhit readonly property
The console.keyhit property checks if a key has been pressed, returning true or false otherwise.
true
false
Example
local console = require "console" print("Waiting for a key press...") while not console.keyhit do sleep() end