Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- lock_screen.lua
- local password = "password" -- Change this to your desired password
- term.clear()
- term.setCursorPos(1,1)
- print("Press Enter to unlock")
- while true do
- local _, key = os.pullEvent("key")
- if key == keys.enter then
- term.clear()
- term.setCursorPos(1,1)
- print("Unlocking...")
- sleep(1) -- Add a delay for effect (optional)
- shell.run("/disk/os/lock.lua")
- break
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement