Advertisement
Marlingaming

Heimbriech Tablet OS - Lock Screen

Sep 8th, 2021 (edited)
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. local oldPull = os.pullEvent
  2. os.pullEvent = os.pullEventRaw
  3. --this program is used when the Boot loader detects the system to be locked
  4. local UnlockCode = "admin"
  5. start()
  6.  
  7. function start()
  8. term.setBackGroundColor("blue")
  9. Screen()
  10. end
  11.  
  12. function Screen()
  13. term.setCursorPos(1,9)
  14. term.write("SYSTEM LOCKED, PLEASE BRING TO LOCAL")
  15. term.setCursorPos(1,10)
  16. term.write("GOV OFFICE FOR UNLOCKING")
  17. term.setCursorPos(1,11)
  18. term.write("if you have access, please enter Code")
  19. while true do
  20. local input = read()
  21. if input == UnlockCode then
  22. settings.get("SystemState","Ready")
  23. print("System Unlocked, restarting in 10 seconds")
  24. sleep(10)
  25. os.reboot
  26. end
  27. end
  28. end
  29. os.pullEvent = oldPull
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement