console.read([length])
Reads from the console using console.stdin. The same result can be obtained using console.stdin:read()
Parameters
[length]
An optional number
representing how much characters must be read from the console, defaulting to 1
Return value
Returns the characters in a stringExample
local console = require "console"
console.writecolor("cyan", "Do you want to quit (y/n) ? ")
if console.read():lower() == "y" then
sys.exit()
end