Wenades

Computercraft - Passworded Login

Jul 4th, 2013
190
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.31 KB | None | 0 0
  1. os.pullEvent = os.pullEventRaw
  2.  
  3. term.clear()
  4. term.setCursorPos(1,1)
  5. password = "1234"
  6.  
  7. print(os.getComputerLabel())
  8. write("Password: ")
  9. input = read("*")
  10. if input == password then
  11.     print("Welcome")
  12.     sleep(3)
  13.     term.clear()
  14.     term.setCursorPos(1,1)
  15. else
  16.     print("Incorrect")
  17.     sleep(3)
  18.     os.reboot()
  19. end
Advertisement
Add Comment
Please, Sign In to add comment