Posted 19 November 2016 - 04:23 PM
So im trying to make a
1: Password file maker(Works)
2: Password protected computer that when you type in a password in a file(password) then it breaks and ends(Not Working)
Here's the code for the first one:
1: Password file maker(Works)
2: Password protected computer that when you type in a password in a file(password) then it breaks and ends(Not Working)
Here's the code for the first one:
write("New Password: ")
input = read()
if input == "F" then
shell.run("startup")
end
local file = fs.open("password", "w")
file.writeLine(input)
file.close()
Now the one thats not working(Called startup):
write("Enter Password: ")
user = read()
local file = fs.open("password", "r")
file.readLine()
file.close()
if user == file then
print("Correct!")
sleep(2)
shell.run("system")
else
print("Incorrect")
sleep(2)
os.reboot()
end