Advertisement
Guest User

new

a guest
Sep 1st, 2014
190
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.76 KB | None | 0 0
  1. term.clear()
  2. term.setCursorPos(1,1)
  3.  
  4. function COMMANDS()
  5.  term.clear()
  6.  term.setCursorPos(1,1)
  7.  print("ENTER COMMAND")
  8.  print("UNLOCK, LOCK, LOGOFF")
  9.  input2 = string.upper(read())
  10.  
  11.  if input2 == "UNLOCK" then
  12.   redstone.setOutput("back",false)
  13.   print("UNLOCKING")
  14.   sleep(1)
  15.   COMMANDS()
  16.  
  17.  elseif input2 == "LOCK" then
  18.   redstone.setOutput("back",true)
  19.   print("LOCK")
  20.   sleep(1)
  21.   COMMANDS()
  22.  
  23.  elseif input2 == "LOGOFF" then
  24.   print("LOGGING OFF")
  25.   sleep(1)
  26.   shell.run("new")
  27.  
  28.  else
  29.   print("INVALID COMMAND")
  30.   sleep(1)
  31.   COMMANDS()
  32. end
  33. end
  34.  
  35. pass = "1"
  36. print("ENTER PASSWORD")
  37.  
  38. input = read("*")
  39. if input == pass then
  40.  print("SUCCESS")
  41.  sleep(2)
  42.  COMMANDS()
  43.  
  44. else
  45.  
  46.  print("DENIED")
  47.  sleep(2)
  48.  shell.run("new")
  49.  
  50. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement