Posted 18 November 2013 - 10:16 AM
After viewing a few posts about passwords, I felt the need to do this.
I will be explaining every line of code.
I will be explaining every line of code.
local os.pullEvent = os.pullEventRaw --Localize to make sure pullEvent in other programs works.
local password --This declares the password variable in a local environment so no one can steal it using other programs.
print("Please enter your password:") --writes a line asking the user to print their password
while read("*")~=password then --Repeat this until the user types in the password
print("Incorrect password") --Writes a line telling the user the password is incorrect
sleep(2) --Give the user time to read the text
term.clear() term.setCursorPos(1,1) --Clears the screen, sets the cursor to the default position, like the clear program
print("PLease enter your password:") --Same as above
end --Stops the script
--Now you should be able to be done.