tima_gt

tde-password 3.4-alpha

Aug 19th, 2014
326
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.75 KB | None | 0 0
  1. minimum = 6
  2. i = 1
  3. term.setBackgroundColor(colors.red)
  4. term.setTextColor(colors.white)
  5. while i < 8 do
  6. term.setCursorPos(10, minimum + i)
  7. write("                        ")
  8. i = i + 1
  9. end
  10. term.setCursorPos(11, 7)
  11. write("    Password         ")
  12. term.setCursorPos(11, 11)
  13. write("write delete for remove")
  14. term.setCursorPos(13, 12)
  15. write("     password")
  16. term.setCursorPos(11, 9)
  17. term.setBackgroundColor(colors.white)
  18. write("                     ")
  19. term.setCursorPos(11, 9)
  20. term.setTextColor(colors.black)
  21. password = read("X")
  22. if password ~= "delete" then
  23. if password ~= "" then
  24.   file = fs.open(".tde-password", "w")
  25.   file.writeLine(password)
  26.   file.close()  
  27. end
  28. else
  29. if fs.exists(".tde-password") then
  30. shell.run("rm .tde-password")
  31. end
  32. end
Advertisement
Add Comment
Please, Sign In to add comment