Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- side = "left"
- count = 3
- i = 60
- while 1 == 1 do
- term.clear()
- term.setCursorPos(1,1)
- print("Inserire Password...")
- print("Rimangono ".. count .." tentativi")
- local input = read("*")
- file = fs.open("prova","r")
- if input == file.readLine() then
- term.clear()
- term.setCursorPos(1,1)
- print("Password esatta!")
- rs.setOutput(side, true)
- sleep(3)
- rs.setOutput(side, false)
- count = 3
- file.close()
- else
- file.close()
- print("Password Errata")
- sleep(1)
- count = count - 1
- if count == 0 then
- count = 3
- while i > 0 do
- term.clear()
- term.setCursorPos(18,10)
- print("Attendi ".. i .." secondi")
- sleep(1)
- i = i - 1
- end
- i = 60
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement