Advertisement
Guest User

facility

a guest
Jun 3rd, 2014
256
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.00 KB | None | 0 0
  1. while true do
  2.  local tries = 0
  3.  local access = 0
  4.  term.clear()
  5.  term.setCursorPos(1, 1)
  6.  print("Authorized Personel Only")
  7.  input = read("*")
  8.  if input == "inferno"then
  9.    access = 1
  10.    term.clear()
  11.    term.setCursorPos(1, 1)
  12.    print("Access Granted. Welcome back misstress")
  13.    while access == 1 do
  14.     input = read()
  15.     if input == "open" then
  16.      redstone.setBundledOutput("back", colors.blue)
  17.      print("Door will be closed again in 10 second.Automatic logout will follow")
  18.        sleep(10.0)
  19.      redstone.setBundledOutput("back", 0)
  20.      access = 0
  21.      elseif input == "exit" then
  22.       error(0)
  23.     end
  24.    end
  25.  elseif tries < 2 then
  26.    print("Access Denied")
  27.    tries = tries+1
  28.   else
  29.    print("Unauthorised entry detected")
  30.    sleep(1.0)
  31.    redstone.setBundledOutput("back", colors.red)
  32.    print("Initiating Purge")
  33.    sleep(3.0)
  34.    redstone.setBundledOutput("back",colors.red+colors.yellow)
  35.    sleep(20.0)
  36.    tries = 0
  37.    redstone.setBundledOutput("back",0)
  38.   end
  39.  end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement