Bimgo

Untitled

Feb 11th, 2013
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.03 KB | None | 0 0
  1. local pass = "password" --Change this to your password.
  2. local dpass = "debug" --Change this to a debuging code, never share it!
  3. local open = 0 --Replace 0 with a value for the door/PC wait time
  4. local open2 = 0 --Replace 0 with a value for the reboot time (time until reboot). Recomended to be .5 -> 2.
  5.  
  6. os.pullEvent = os.pullEventRaw
  7. term.clear() --dont config term.clear()
  8. print("This 'system' is locked by [USER]") --Replace 'system' if you want, [USER] is your name.
  9. write("password: ")
  10. input = read("*")
  11. if input == pass then
  12. print("Welcome [USER]") --Replace [USER] with your name.
  13. redstone.setOutput("side", true) --Replace "side" with the door side (based on PC)
  14. sleep(open) ---Do not change this here, change it up there.
  15. redstone.setOutput("side", false) --Replace "side" with the door side (based on PC)
  16. term.clear()
  17. term.setCursorPos(1,1)
  18. print("CraftOS 1.4")
  19. sleep(open2)
  20. --os.reboot <-Uncomment that if you want a door lock and comment 'print("CraftOS 1.4")'.
  21. else
  22. print("Wrong password")
  23. sleep(open2)
  24. os.reboot()
  25. end
Advertisement
Add Comment
Please, Sign In to add comment