Advertisement
NOAAAH

Untitled

Aug 22nd, 2014
206
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.94 KB | None | 0 0
  1. local pullEvent = os.pullEvent
  2. os.pullEvent = os.pullEventRaw
  3.  
  4. local adminpw = "2261996"
  5. local side = "back"
  6. local password = "0712"
  7. local opentime = 5
  8.  
  9. while true do
  10.   term.clear()
  11.   term.setCursorPos(1,1)
  12.   print("N-Lock Inc.")
  13.   print("")
  14.   write("Password:")
  15.  
  16.   local input = read("*")
  17.  
  18.   term.clear()
  19.   term.setCursorPos(1,1)
  20.  
  21.   if input == password then
  22.     textutils.slowPrint("Zugriff gewaehrt.")
  23.     rs.setOutput(side,false)
  24.     sleep(opentime)
  25.     rs.setOutput(side,true)
  26.   elseif input == adminpw then
  27.     textutils.slowPrint("Hallo Yoda. Das Programm wurde erfolgreich herunter gefahren. Um es erneut zu starten, gebe bitte 'reboot' ein.")
  28.     os.pullEvent = pullEvent
  29.     break
  30.   else
  31.     textutils.slowPrint("Zugriff verweigert. Aktiviere Alarm-System...")
  32.     textutils.slowPrint("Bitte versuche es in 30 Sekunden erneut.")
  33.     rs.setOutput("bottom", true)
  34.     sleep(30)
  35.     rs.setOutput("bottom", false)
  36.  
  37.   end
  38. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement