Guest User

Untitled

a guest
Oct 19th, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.06 KB | None | 0 0
  1. function unsetAll(sSide)
  2.     redstone.setBundledOutput(sSide, 0)
  3. end
  4. function up(side)
  5.     x=0
  6.     while x ~= 5 do
  7.         redstone.setBundledOutput(side, colors.yellow)
  8.         sleep(1)
  9.         unsetAll(side)
  10.         sleep(1)
  11.   x=x+1
  12.  end
  13. end
  14. function down(side)
  15.     x=0
  16.     while x ~= 5 do
  17.         redstone.setBundledOutput(side, colors.white)
  18.         sleep(1)
  19.         unsetAll(side)
  20.         sleep(1)
  21.   x=x+1
  22.  end
  23. end
  24. function dotAndDie()
  25.     for i=0, 5 do
  26.         write(".")
  27.         sleep(0.5)
  28.     end
  29.     os.reboot()
  30. end
  31.  
  32. access= false
  33.  
  34. print("Vsandrewuk's Secret Bunker")
  35. print("")
  36. print("Username: ")
  37. username= read()
  38.  
  39. if username == "test" then
  40.     print("Password: ")
  41.     password = read("*")
  42.     if password =="test" then
  43.         access = true
  44.     else
  45.         print("Error, you have entered the wrong password, Terminating script.")
  46.         dotAndDie()
  47.     end
  48. else
  49.     print("Error, you have entered and invalid username, Terminating script.")
  50.     dotAndDie()
  51. end
  52.  
  53. if access == true then
  54.     print("Successful login, lowering entrance")
  55.     sleep(0.5)
  56.     down("back")
  57.     sleep(5)
  58.     up("back")
  59.     print("Terminating Script")
  60.     dotAndDie()
  61. end
Add Comment
Please, Sign In to add comment