Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- reader = peripheral.wrap("left")
- detected = false
- funshinex = false
- damnedsky = false
- while true do
- if detected then
- if funshinex and not damnesdsky then
- rs.setOutput("bottom",true)
- end
- sleep(3)
- rs.setOutput("bottom",false)
- funshinex = false
- damnedsky = false
- end
- term.clear()
- term.setCursorPos(1,1)
- reader.scan() -- scans for 1 Second
- detected = false
- while true do
- event, message = os.pullEvent()
- if event == "rfid_detected" then
- detected = true
- print("An RFID Card was detected")
- print("Card Data: "..message)
- if message == "FunshineX11011" then
- funshinex = true
- elseif message == "damnedsky" then
- damnedsky = true
- end
- elseif event == "rfid_scan_done" then
- break
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement