Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local side = 'bottom'
- local drive = peripheral.wrap('left')
- local dir = "disk/password"
- while true do
- if not fs.exists(dir) then
- drive.eject()
- os.sleep(1)
- else
- local password = fs.open(dir,"r")
- if password.readLine() == 'chick' then
- redstone.setOutput(side,true)
- while true do
- if not fs.exists(dir) then
- break
- end
- os.sleep(1)
- end
- redstone.setOutput(side,false)
- else
- drive.eject()
- os.sleep(1)
- end
- password.close()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement