Advertisement
DOGGYWOOF

Lockscreen with clock

Mar 12th, 2024 (edited)
10
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. -- lock_screen.lua
  2.  
  3. local password = "password" -- Change this to your desired password
  4.  
  5. term.clear()
  6. term.setCursorPos(1,1)
  7. print("Press Enter to unlock")
  8.  
  9. while true do
  10. local _, key = os.pullEvent("key")
  11.  
  12. if key == keys.enter then
  13. term.clear()
  14. term.setCursorPos(1,1)
  15. print("Unlocking...")
  16. sleep(1) -- Add a delay for effect (optional)
  17. shell.run("/disk/os/lock.lua")
  18. break
  19. end
  20. end
  21.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement