But I want to make there be a small chance that it will fail (15%)
How can I do this?
This is the code, just incase you want it to see what you can do.
local code = "1337"
term.clear()
sleep(0.1)
print "Enter the code! Be sure the silo is powered."
write "CODE: "
input = read()
if input == "1337" then
write "Accessing mainframe"
sleep (2)
write "."
sleep (2)
write "."
sleep(1)
write "."
sleep (1)
term.clear()
sleep(0.1)
term.setCursorPos(1,1)
print "Success! The missiles are firing in"
write "3"
sleep(1)
term.clearLine()
term.setCursorPos(1,2)
write "2"
sleep(1)
term.clearLine()
term.setCursorPos(1,2)
write "1"
sleep(1)
print ".....FIRING!!!!"
sleep(0.3)
rs.setOutput ("right", true)
print "Action complete"
sleep(2)
os.shutdown()
elseif input == "modify" then
print "You may now modify the mainframe"
sleep(1)
elseif input == "abort" then
write "Aborting Files"
sleep(1)
write "."
sleep(1)
write "."
sleep(1)
write "."
sleep(0.5)
term.setCursorPos(1,5)
print "Successfully Aborted!"
sleep(3)
os.shutdown()
else
write "Accessing mainframe"
sleep(1)
write "."
sleep(1)
write "."
sleep(1)
write "."
term.clearLine()
term.setCursorPos(1,4)
print "Wrong code!"
sleep(3)
os.shutdown()
end
Hope you can help.












