martin0leung

password

Jul 10th, 2013
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.57 KB | None | 0 0
  1. function clear()
  2.    term.clear()
  3.    term.setCursorPos(1,1)
  4. end
  5.  
  6. clear()
  7. print("welcome to martin0leung, skrillex6264 and michelle0leung's house, in order to open the door, please type in the password")
  8.  
  9. function lock()
  10.    os.pullEvent = os.pullEventRaw
  11. end
  12.  
  13. local pass = 322221
  14.  
  15. term.setCursorPos(1,5)
  16. write("password:")
  17. input = read("*")
  18. if pass == input then
  19.    print("Password correct!")
  20.    redstone.setOutput("top",true)
  21.    sleep(5)
  22.    redstone.setOutput("top",false)
  23.    shell.run("reboot")
  24. else
  25.    print("password incorrect!")
  26.    shell.run("reboot")
  27. end
Advertisement
Add Comment
Please, Sign In to add comment