Posted 28 August 2013 - 11:13 AM
Hey guys new here and trying to figure out how to add something to this code (shown below) i want it to power a wire on left if password is incorrect (possibly if inccorect three times in a row) but just correct or incorrect would be fine as well. thanks for your time :)/>/>
password = ("amber")
side = ("right")
write ("admin password: ")
pword = read ()
if pword == (password) then
sleep(1)
print ("Password correct")
sleep(0.3)
print ("Oppening door...")
sleep(0.25)
print ("You have 5 seconds")
redstone.setOutput (side, true)
sleep(1)
print ("4")
sleep(1)
print ("3")
sleep(1)
print ("2")
sleep(1)
print ("1")
sleep(1)
print ("Closing door...")
sleep(0.25)
redstone.setOutput (side, false)
else
sleep(1)
print ("Password incorrect")
end
os.shutdown()
Edited by