Advertisement
Guest User

startup

a guest
Apr 9th, 2020
292
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.76 KB | None | 0 0
  1. os.pullEvent = os.pullEventRaw
  2.  
  3. redstone.setOutput ("left", false)
  4. attempts = 0
  5. correctpassword = "rfg"
  6. print("Attempt:"..attempts.."/3")
  7. write("ENTER AUTHORISATION CODE:")
  8. password = read("*")
  9.  
  10. if password == (correctpassword) then
  11. write("CODE VALID")
  12. redstone.setOutput("left", true)
  13. sleep(5)
  14. os.reboot()
  15.  
  16. elseif password == "operationalresetonedelta" then
  17. write("Initiating Administrative Mode...")
  18. write("") -- code break
  19.  
  20. else
  21. while password ~= (correctpassword) do
  22. attempts = attempts + 1
  23. print("INVALID CODE:"..attempts.."/3")    
  24. password = read("*")
  25. if password == (correctpassword)
  26. then print("CODE VALID")
  27. redstone.setOutput("left", true)
  28. sleep(5)
  29. os.reboot()
  30. elseif attempts  >= 3 then
  31. sleep(5)
  32. os.reboot() end
  33.  
  34.     end
  35.  
  36.     end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement