Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local user
- local pass
- local cp
- local np
- local np1
- term.clear()
- term.setCursorPos(1,1)
- os.loadAPI("/dat")
- user = dat.u()
- pass = dat.p()
- os.unloadAPI("/dat")
- print("Starting Pass Change")
- sleep(1)
- write("Enter Current Password > ")
- cp = read("*")
- if (cp == pass) then
- write("Enter New Password > ")
- np = read("*")
- write("Confirm New Password > ")
- np1 = read("*")
- if (np == np1) then
- shell.run("delete dat")
- local g = fs.open("dat", "w")
- g.writeLine("local x")
- g.writeLine("local y")
- g.writeLine(" ")
- g.writeLine("x = \"".. np.. "\"")
- g.writeLine("y = \"".. user.. "\"")
- g.writeLine("function p()")
- g.writeLine("return x")
- g.writeLine("end")
- g.writeLine("function u()")
- g.writeLine("return y")
- g.writeLine("end")
- g.flush()
- g.close()
- print("Password Change Complete ...")
- read()
- else
- print("Please make sure new password matches...")
- read()
- end
- else
- print("Wrong Password.. Closing")
- sleep(1)
- end
- print("Closing Password Change")
- read()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement