Advertisement
marctew

RoomAccess

Oct 21st, 2019
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. local room = "1"
  2. local diskloaded = disk.isPresent("top")
  3. term.clear()
  4. term.setCursorPos(1,1)
  5. print("Awaiting Access Key")
  6. while true do
  7. if diskloaded=="true" then
  8. print("Loading Key")
  9. os.loadAPI( "disk/accesscode" )
  10. if room==accesscode.roomnumber then
  11. print("Key Correct")
  12. disk.eject("top")
  13. redstone.setOutput("right", true)
  14. sleep(2)
  15. redstone.setOutput("right", false)
  16. os.reboot()
  17. end
  18. end
  19. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement