Advertisement
Guest User

CC: Keycard access #1

a guest
Apr 17th, 2014
38
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. --[[
  2. Computer at the door.
  3. Requires:
  4. Computer
  5. Monitor on top, 2 wide
  6. Disk drive behind
  7. Optional hopper
  8. Name 'startup' and reboot computer.
  9. ]]--
  10.  
  11. mon = peripheral.wrap('monitor_1')
  12. mon.clear()
  13. mon.setCursorPos(1,1)
  14. if fs.exists('disk/password') then
  15. mon.write('Access Granted')
  16. disk.eject('right')
  17. redstone.setOutput('left', true)
  18. elseif fs.isDir('disk') then
  19. mon.write('Access Denied')
  20. disk.eject('right')
  21. end
  22. sleep(4)
  23. redstone.setOutput('left', false)
  24. mon.clear()
  25. os.reboot()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement