Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function clear()
- term.setBackgroundColor(colors.gray)
- term.setTextColor(colors.yellow)
- term.clear()
- term.setCursorPos(1, 1)
- end
- clear()
- print("This guide will lead you through changing your password.")
- print("")
- term.setTextColor(colors.white)
- print("Please enter your new password.")
- term.setTextColor(colors.red)
- term.write(">: ")
- local first = read("*")
- term.setTextColor(colors.white)
- print("Please re-enter your new password.")
- term.setTextColor(colors.red)
- term.write(">: ")
- local second = read("*")
- if second == first then
- clear()
- print("Modifying your password. Please wait.")
- sleep(2)
- fs.delete("/.bman/pass/pass")
- local h = fs.open("/.bman/pass/pass", "w")
- h.write(first)
- h.close()
- print("Done.")
- sleep(3)
- os.reboot()
- else
- clear()
- print("Passwords did not match.")
- sleep(4)
- shell.run("/.bman/pass/opt")
- end
Advertisement
Add Comment
Please, Sign In to add comment