Advertisement
Lladnar45

Autocrafter Access

Mar 6th, 2022 (edited)
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.98 KB | None | 0 0
  1. print("Would you like to access the Autocrafter? (y/n)")
  2. input = read()
  3. if input == "y" then
  4.     while true do
  5.      term.clear()
  6.      term.setCursorPos(1, 1)
  7.      print("Please Enter Password:")
  8.      input = read("*")
  9.      if input == "12304" then
  10.       term.clear()
  11.       term.setCursorPos(1, 1)
  12.       print("Please Enter Desired Time: ")
  13.       input = read()
  14.       print("You have " .. input .. " seconds to access the autocrafter.")
  15.       redstone.setOutput("back", true)
  16.       for i = input, 1, -1 do
  17.         print(i .. " seconds remaining")
  18.         sleep(1)
  19.       end
  20.       redstone.setOutput("back", false)
  21.       os.reboot()
  22.      else
  23.         print("Password Incorrect!")
  24.         print("Rebooting...")
  25.         sleep(2)
  26.         os.reboot()
  27.      end
  28.     end
  29. elseif input == "n" then
  30.     while true do
  31.      term.clear()
  32.      term.setCursorPos(1,1)
  33.      print("Why would you even open the computer..?")
  34.      sleep(2)
  35.      os.reboot()
  36.     end
  37. else
  38.     print("Rebooting...")
  39.     sleep(2)
  40.     os.reboot()
  41. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement