Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local pass = "password" --Change this to your password.
- local dpass = "debug" --Change this to a debuging code, never share it!
- local open = 0 --Replace 0 with a value for the door/PC wait time
- local open2 = 0 --Replace 0 with a value for the reboot time (time until reboot). Recomended to be .5 -> 2.
- os.pullEvent = os.pullEventRaw
- term.clear() --dont config term.clear()
- print("This 'system' is locked by [USER]") --Replace 'system' if you want, [USER] is your name.
- write("password: ")
- input = read("*")
- if input == pass then
- print("Welcome [USER]") --Replace [USER] with your name.
- redstone.setOutput("side", true) --Replace "side" with the door side (based on PC)
- sleep(open) ---Do not change this here, change it up there.
- redstone.setOutput("side", false) --Replace "side" with the door side (based on PC)
- term.clear()
- term.setCursorPos(1,1)
- print("CraftOS 1.4")
- sleep(open2)
- --os.reboot <-Uncomment that if you want a door lock and comment 'print("CraftOS 1.4")'.
- else
- print("Wrong password")
- sleep(open2)
- os.reboot()
- end
Advertisement
Add Comment
Please, Sign In to add comment