My code is as follows, (please note: I'm a beginner at this, so my code might be a bit messy.)
while true do
term.clear()
term.setCursorPos(1, 1)
print ("A password is required:")
print ("Forgot the pasword? Type hint.")
local input = read("*")
if input == "password" then
redstone.setOutput("back", true)
sleep(5)
redstone.setOutput("back", false)
else if input == "hint" then
print ("It has pass in it.")
end
end
end
I had to put two ends for some reason, otherwise it would say "end" expected at line 14 (where the second to last end is at the moment) to execute while true do or something like that.
Anyways, how can I make it print out the "It has pass in it." if they type hint?
Thank you:)!












