Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- orginalPassword = "Turbo"
- openDoor = colors.orange
- closeBehind = colors.red
- openGround = colors.white
- while true do
- term.clear()
- term.setCursorPos(1,1)
- print("--------------------------------")
- print("--- NoxiaZ Security ---")
- print("--------------------------------")
- print("")
- print("Commands:")
- print("Press O for open the door")
- print("Press C for close the door")
- local event = {os.pullEvent()}
- if (event[2] == "o") then
- redstone.setBundledOutput("back", closeBehind)
- write("Type in the code: ")
- password = read()
- if (orginalPassword == password) then
- redstone.setBundledOutput("back", openDoor)
- else
- redstone.setBundledOutput("back", openGround + closeBehind)
- sleep(1)
- redstone.setBundledOutput("back",0)
- end
- elseif (event[2]=="c") then
- redstone.setBundledOutput("back",0)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment