Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- while true do
- if not fs.exists("config.cfg") then
- local f = fs.open("config.cfg","w")
- print ("What is the gate's accreditation level ? ")
- local lvl = read()
- f.write(lvl)
- f.close()
- end
- local _, side = os.pullEvent("disk")
- local f = fs.open("config.cfg","r")
- local lvl = f.readLine()
- f.close()
- if fs.exists("disk/lvl.info") then
- local f2 = fs.open("disk/lvl.info","r")
- local l = f2.readLine()
- f2.close()
- l = tonumber(l)
- lvl = tonumber(lvl)
- print(lvl)
- print(l-lvl)
- if l-lvl >= 0 then
- rs.setOutput("bottom",true)
- disk.eject(side)
- sleep(3)
- rs.setOutput("bottom",false)
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement