Advertisement
Guest User

startup

a guest
Aug 22nd, 2014
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.50 KB | None | 0 0
  1. pass = "age368RG"
  2. term.clear()
  3. term.setCursorPos(1,1)
  4. print("ID Card Reader")
  5. local reader = peripheral.wrap("top")
  6.     while true do
  7.     local event,arg1,arg2,arg3 = os.pullEvent()
  8.     if event == "mag_swipe" then
  9.       print("Card Swiped.")
  10.       if arg1 == pass then
  11.       print("Access Granted.")
  12.       rs.setOutput("right", true)
  13.       sleep(3)
  14.       os.reboot()
  15.       else
  16.       print("Access Denied.")
  17.       reader.setInsertCardLight(true)
  18.       sleep(1.5)
  19.       reader.setInsertCardLight(false)
  20.       os.reboot()
  21.       end
  22.     end
  23.     end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement