Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- c = require'component'
- gpu = require'component'.gpu
- ep = require'event'.pull
- door = require'component'.os_door
- rs = require'component'.redstone
- gpu.setResolution(24,5)
- while true do
- h = 0
- os.sleep(3)
- gpu.setBackground(0xFFFF00)
- gpu.fill(1,1,24,5," ")
- gpu.setBackground(0xBDBDBD)
- gpu.set(5,3," ")
- gpu.setForeground(0xFFFF00)
- gpu.set(5,3,"Проведите карту.")
- type,_,_,data,_,_ = ep()
- if type == "magData" then
- h = 1
- else
- h = 0
- end
- if h == 1 then
- if data == "RXZlcnlib2R5" then
- gpu.setBackground(0x00FF00)
- gpu.fill(1,1,24,5," ")
- gpu.setBackground(0xBDBDBD)
- gpu.set(5,3," ")
- gpu.setForeground(0x00FF00)
- gpu.set(5,3,"Код карты принят")
- rs.setOutput(1,15)
- door.toggle()
- rs.setOutput(1,0)
- os.sleep(2)
- door.toggle()
- else
- gpu.setBackground(0xFF0000)
- gpu.fill(1,1,24,5," ")
- gpu.setBackground(0xBDBDBD)
- gpu.set(4,3," ")
- gpu.setForeground(0xFF0000)
- gpu.set(4,3,"Ошибка кода карты!")
- rs.setOutput(0,15)
- os.sleep(1)
- rs.setOutput(0,0)
- end
- end
- end
Add Comment
Please, Sign In to add comment