Upscalefanatic3

Place Password Script for GUIs

Jan 5th, 2020
265
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local input
  2. local pass = "1342z"
  3.  
  4. function sleep(n)
  5.     local t0 = os.clock()
  6.     while os.clock() - t0 <= n do
  7.        
  8.     end
  9. end
  10.  
  11. while true do
  12.     print("Type the password:")
  13.     input = read()
  14.     if input==pass then
  15.         shell.run("clear")
  16.         print("!!! Access Granted !!!")
  17.         redstone.setAnalogOutput("back", 15)
  18.         sleep(5)
  19.         redstone.setAnalogOutput("back", 0)
  20.         shell.run("clear")
  21.     else
  22.         shell.run("clear")
  23.         print("!!! Access Denied !!!")
  24.         sleep(1)
  25.         shell.run("clear")
  26.     end
  27. end
Add Comment
Please, Sign In to add comment