CodeCrafter

Lock1

May 1st, 2013
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. passkey = "AngryOwnage"
  2. while true do
  3. if disk.isPresent("back") then -- Put side to the side the disk drive is on
  4. h = fs.open("disk/passcode", "r")
  5. if h.readAll() == passkey then
  6. print("Accepted")
  7. rs.setOutput("left",true)
  8. sleep(3)
  9. os.reboot()
  10. else
  11. print("Denied")
  12. disk.eject("back") -- Replace side with diskdrive side
  13. end
  14. end
  15. end
Advertisement
Add Comment
Please, Sign In to add comment