Anywho this was the original script:
function clear() term.clear() term.setCursorPos(1,1) end function lock() local PASSWORD = "PASSWORD GOES HERE" local temp = os.pullEvent local function dkeys(swap) disable = { [0] = function() os.pullEvent = temp end, [1] = function() os.pullEvent = os.pullEventRaw end } disable[swap]() end clear() dkeys(0) print("Enter password:") write("> ") local input = read("*") if input == PASSWORD then clear() dkeys(0) print("Access granted!") sleep(1) clear() textutils.slowPrint("Unlocking...") print("Welcome!") redstone.setOutput("back", true) sleep(4) redstone.setOutput("back", false) os.reboot() else clear() print("Access denied!") textutils.slowPrint("Logging username...") sleep(1) os.reboot() end end lock()
This section in specific allowed me to stop a user from terminating my 'startup' program.
local function dkeys(swap) disable = { [0] = function() os.pullEvent = temp end, [1] = function() os.pullEvent = os.pullEventRaw end } disable[swap]()
Have there been changes to the terminate event? My script use to work like a charm, is there some new way to block the user from terminating my program?