Posted 21 September 2012 - 02:03 AM
I dont care what other people say i made this lock may not be first but i did not copy it.
I took what i new of coding and made this this is my first code so take it easy on me
os.pullEvent = os.pullEventRaw
print("Welcome Enter user")
correctuser = "Your user here"
write("Username:")
user = read("*")
if user == (correctuser) then
term.clear()
else
print("INCORRECT ACTIVATING ALARM")
rs.setOutput("back",true)
sleep(5)
os.shutdown()
end
correctpass = "Enter a password here"
write("Password:")
pass= read("*")
if pass == (correctpass) then
print("Welcome enter")
rs.setOutput("Side door is on",true)
sleep(3)
term.clear()
os.shutdown()
else
print("INCORRECT ACTIVATING ALARM")
rs.setOutput("back",true)
sleep(5)
os.shutdown()
end
if you have any problems let me know. :)/>/>
I took what i new of coding and made this this is my first code so take it easy on me
os.pullEvent = os.pullEventRaw
print("Welcome Enter user")
correctuser = "Your user here"
write("Username:")
user = read("*")
if user == (correctuser) then
term.clear()
else
print("INCORRECT ACTIVATING ALARM")
rs.setOutput("back",true)
sleep(5)
os.shutdown()
end
correctpass = "Enter a password here"
write("Password:")
pass= read("*")
if pass == (correctpass) then
print("Welcome enter")
rs.setOutput("Side door is on",true)
sleep(3)
term.clear()
os.shutdown()
else
print("INCORRECT ACTIVATING ALARM")
rs.setOutput("back",true)
sleep(5)
os.shutdown()
end
if you have any problems let me know. :)/>/>