Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- LockDoor v1.0 by yerathel
- -- http://interageek.fr/
- -- Copyright © 2015
- -- All Right Reserved
- local side = "left" -- Ou est la porte.
- local password = "test" -- Le code.
- local opentime = 5 -- Temps en sec de l ouverture
- while true do
- term.clear()
- term.setCursorPos(1,1)
- write("LockDoor© • Entrez votre mot de passe: ")
- local input = read("*")
- if input == password then
- term.clear()
- term.setCursorPos(1,1)
- print("Mot de passe correct!")
- rs.setOutput(side,true)
- sleep(opentime)
- rs.setOutput(side,false)
- else
- print("Mot de passe incorrect!")
- sleep(2) -- Attendre 2 sec
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement