Guest User

Untitled

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