Advertisement
Darking560

SAS security

Feb 4th, 2015
201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.62 KB | None | 0 0
  1. bio = peripheral.wrap("biolock_1")
  2. keypad = peripheral.wrap("keypadlock_0")
  3.  
  4. while true do
  5.     rs.setOutput("right",true)
  6.     rs.setOutput("front",false)
  7.     event, print, attachName, learnedName, accessLevel = os.pullEvent("biolock")
  8.     if accessLevel == 10 then
  9.         rs.setOutput("front",true)
  10.         rs.setOutput("right",false)
  11.         rs.setOutput("down",true)
  12.         sleep(0.5)
  13.         event, attachName, codeName, accessLevel = os.pullEvent("keypad_code")
  14.         if codeName == "cgood" then
  15.             rs.setOutput("right",false)
  16.             rs.setOutput("back",true)
  17.             sleep(5)
  18.             rs.setOutput("back",false)
  19.             rs.setOutput("down",false)
  20.         end
  21.     end
  22. sleep(2)
  23. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement