Advertisement
Guest User

Untitled

a guest
Apr 19th, 2019
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.00 KB | None | 0 0
  1. -- Hackproof Door    
  2. -- Written by Cacher97, using basic "lock" code and modified to suit needs    
  3. -- Posted to 'The Tekkit Wiki' on 15/11/2012
  4. oldPullEvent = os.pullEvent    
  5. os.pullEvent =os.pullEventRaw    
  6. local password = {"cacher97", "cacher"}    
  7. local consolePassword = "admin"    
  8. term.clear()    
  9. term.setCursorPos(1,1)    
  10. write("Password: ")    
  11. local input = read("*")    
  12. if input == password then    
  13. term.clear()    
  14. term.setCursorPos(1,1)    
  15. print("Door Open")    
  16. rs.setOutput("bottom",true)    
  17. sleep(2)    
  18. rs.setOutput("bottom",false)    
  19. os.reboot()    
  20. else    
  21. if input == consolePassword then    
  22. term.clear()    
  23. term.setCursorPos(1,1)    
  24. print("Console Access Granted")    
  25. else    
  26. term.clear()    
  27. term.setCursorPos(1,1)    
  28. print("Incorrect Password")    
  29. sleep(2)    
  30. term.clear()    
  31. term.setCursorPos(1,1)    
  32. textutils.slowPrint("Terminal Locking Down in 3...2...1...")    
  33. sleep(.5)    
  34. os.reboot()    
  35. end    
  36. end    
  37. os.pullEvent = oldPullEvent
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement