Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local mon = peripheral.wrap("back")
- term.redirect(mon)
- local status = {"<Enter Card>","<Rejected>","<Granted>"}
- local current = 1
- local combo = "#1234567890"
- local lastTimer
- while true do
- term.clear()
- term.setCursorPos(1,1)
- print("Welcome tonIMMIBIS CORP")
- print(status[current])
- local event,arg1,arg2,arg3 = os.pullEvent()
- if event == "timer" and arg1 == lastTimer then
- current = 1
- lastTimer = nil
- rs.setOutput("bottom",false)
- elseif event == "mag_swipe" then
- if arg1 == combo then
- lastTimer = os.startTimer(3)
- current = 3
- rs.setOutput("bottom",true)
- else
- lastTimer = os.startTimer(3)
- current = 2
- end
- end
- end
Add Comment
Please, Sign In to add comment