Alright, thx for the clarification. Might've been better if you just posed your question there. <_</>/>
You have to configure his program before you can use it.
I.e. you have to replace all of these…
{LOCATION}
{PASSWORD}
{SIDE OF DOOR}
… with some values.
{LOCATION} can be replaced by anything, because that is only what is being printed on the screen.
{PASSWORD} you have to replace with the password you wish to use.
{SIDE OF DOOR} has to be replaced by one of these values:
front,
back,
left,
right,
top,
bottom.
Example:Let's say you have a
shed with a door.
Also, let's say the door of the shed is connected to the
left side of the computer.
And let's say you want to use "
secret" as your password.
Then the code could look like this:
local function clearScreen()
term.clear()
term.setCursorPos(1, 1)
end
while true do
clearScreen()
print ("Type password to enter the shed!") -- Replaced {LOCATION} with 'the shed'
if read("*") == "secret" then -- Replaced {PASSWORD} with 'secret'
clearScreen()
print("Correct Password!")
print("Open door for how long?")
local a = read()
clearScreen()
print("Opening door!")
sleep (1)
redstone.setOutput("left", true) -- Replaced {SIDE OF DOOR} with 'left'
clearScreen()
sleep (a)
else
clearScreen()
print("Incorrect Password, please try again.")
sleep (5)
end
end