Now to my problem, I am trying to create a script that accomplishes two things:
1. Easy password door script
2. I don't want to know their password (even though I could easily get it)
My idea so far has worked out in the form of a floppy disk, that I will hand to the person,
on top of a computer and a disk drive. The program is be named "startup", and as soon
as the person boots the computer with the floppy it goes right into the program. However,
I have been trying to make it so the script asks what you want the password to be, then
it will run the password door code afterwards. So the problem I have here is making someone
able to define the password, then using that password in the script. Another point I would like to
make here is that the whole floppy disk system is so no one can crack the person' password, unless
they retrieved the floppy disk and figure out how to take the program from it (which I only know how
to copy files to a disk, not retrieve them).
local pullEvent = os.pullEvent
local Password == {}
while true do
term.clear()
term.setCursorPos(1, 1)
write("Enter desired password:")
input = read()
Password = read()
while true do
term.clear()
termsetCursorPos(1, 1)
print("Please enter password:")
input = read("*")
if input == Password then
redstone.setOutput("left",true)
redstone.setOutput("right",true)
sleep(3)
redstone.setOutput("right",false)
redstone.setOutput("left",false)
end
end