Advertisement
lewislovesgames

@DerFisch startup

Dec 14th, 2014
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.38 KB | None | 0 0
  1. local oldpe = os.pullEvent
  2.  
  3. local locked = false
  4.  
  5. function lock()
  6.  os.pullEvent = os.pullEventRaw
  7.  locked = true
  8. end
  9. function unlock()
  10.  term.clear()
  11.  term.setCursorPos(1,5)
  12.  write("Password: ")
  13.  local input = read("*")
  14.  if input ~= "cubix" then
  15.   return
  16.  end
  17.  os.pullEvent = oldpe
  18.  locked = false
  19. end
  20. lock()
  21. while locked do
  22.  unlock()
  23. end
  24. sleep(0.2)
  25. shell.run("clear")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement