Advertisement
dezindzer

2. lock

Mar 13th, 2015
260
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.72 KB | None | 0 0
  1. os.pullEvent = os.pullEventRaw
  2. while true do
  3.     term.clear()
  4.     term.setCursorPos(1,1)
  5.     print("dezindzer Security INC.")
  6.     print("")
  7.     write("Pass> ")
  8.     input = read("*")
  9.     sfile = io.open("code", "r")
  10.     pass = sfile:read()
  11.     sfile:close()
  12.     if pass == input then
  13.         term.clear()
  14.         term.setCursorPos(1,1)
  15.         print("dezindzer Security INC.")
  16.         print("")
  17.         print("1 = Change monitor settings")
  18.         print("2 = Change terminal code")
  19.         print("3 = Exit")
  20.         print("")
  21.         write("> ")
  22.         input2 = read()
  23.         if input2 == "1" then
  24.             shell.run("edit config")
  25.             os.reboot()
  26.         elseif input2 == "2" then
  27.             shell.run("edit code")
  28.             sleep(0)
  29.         elseif input2 == "3" then
  30.             sleep(0)
  31.         end
  32.     else
  33.         print("Wrong code")
  34.         sleep(3)
  35.     end
  36. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement