nap14hockey icon

Computercraft Keycard Door Page 1 (Keycard Lock)

nap14hockey | PRO | 06/24/14 12:31:11 AM UTC | 0 ⭐ | 463 👁️ | Never ⏰ | []
Lua |

860 B

|

None

|

0 👍

/

0 👎

redstone.setOutput('right', false)
print("Keycard Lock By Nap14hockey")
sleep(1)
while true do
  sleep(1)
  os.pullEvent = os.pullEventRaw
  term.setCursorPos(1,1)
  mon = peripheral.wrap('top')
  mon.clear()
  mon.setCursorPos(1,1)
  mon.write('LEVEL 1 REQUIRED')
  if fs.exists('disk/level1') then
    mon.clear()
    mon.setCursorPos(1,1)
    mon.write('Access Granted')
    disk.eject('down')
    redstone.setOutput('right', true)
  elseif fs.exists('disk/dev') then
    mon.clear()
    mon.setCursorPos(1,1)
    mon.write('Welcome Developer')
    redstone.setOutput('right', true)
    sleep(2)
    mon.clear()
    disk.eject('down')
    break
  elseif fs.isDir('disk') then
    mon.clear()
    mon.setCursorPos(1,1)
    mon.write('Access Denied')
    disk.eject('back')
  end
  sleep(2)
  redstone.setOutput('right', false)
  mon.clear()
  end

Comments