nap14hockey

Computercraft Keycard Door Page 1 (Keycard Lock)

Jun 23rd, 2014
486
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.86 KB | None | 0 0
  1. redstone.setOutput('right', false)
  2. print("Keycard Lock By Nap14hockey")
  3. sleep(1)
  4. while true do
  5.   sleep(1)
  6.   os.pullEvent = os.pullEventRaw
  7.   term.setCursorPos(1,1)
  8.   mon = peripheral.wrap('top')
  9.   mon.clear()
  10.   mon.setCursorPos(1,1)
  11.   mon.write('LEVEL 1 REQUIRED')
  12.   if fs.exists('disk/level1') then
  13.     mon.clear()
  14.     mon.setCursorPos(1,1)
  15.     mon.write('Access Granted')
  16.     disk.eject('down')
  17.     redstone.setOutput('right', true)
  18.   elseif fs.exists('disk/dev') then
  19.     mon.clear()
  20.     mon.setCursorPos(1,1)
  21.     mon.write('Welcome Developer')
  22.     redstone.setOutput('right', true)
  23.     sleep(2)
  24.     mon.clear()
  25.     disk.eject('down')
  26.     break
  27.   elseif fs.isDir('disk') then
  28.     mon.clear()
  29.     mon.setCursorPos(1,1)
  30.     mon.write('Access Denied')
  31.     disk.eject('back')
  32.   end
  33.   sleep(2)
  34.   redstone.setOutput('right', false)
  35.   mon.clear()
  36.   end
Advertisement
Add Comment
Please, Sign In to add comment