Advertisement
DerMarten

[Lua/Computercraft] Password Turtle

Jan 4th, 2015
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.71 KB | None | 0 0
  1. shell.run("clear")
  2. function title()
  3.     print("WriteTheOwnerNameHere Turtle")
  4. end
  5. password = "EnterYourPasswordHere"
  6. count = 0
  7. run = true
  8. pwError = false
  9. while run do
  10.     if pwError then
  11.         print("Passwort Falsch")
  12.     end
  13.     if count == 8 then
  14.         timeout = true
  15.         count = 0
  16.         tcount = 120
  17.         while timeout do
  18.             if tcount == 0 then
  19.                 timeout = false
  20.             end
  21.             shell.run("clear")
  22.             write("Du must ")
  23.             write(tcount)
  24.             write(" sek warten bis du dich einloggen kannst")
  25.             os.sleep(1)
  26.             tcount = tcount - 1
  27.         end
  28.     end
  29.     shell.run("clear")
  30.     title()
  31.     write("Passwort: ")
  32.     if password == io.read() then
  33.        
  34.     run = false
  35.     shell.run("clear")
  36.     title()
  37.     else
  38.         pwError = true
  39.         count = count + 1
  40.     end
  41. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement