I have just made this more awesome because you guys gave me inspiration. New code here:
answer = {
"It is Certain ",
" Decidedly So ",
" No ",
" Yes ",
" No doubt ",
" Never ",
" Unknown ",
" Ask again ",
" Doubtful ",
" Most Likely ",
"Cannot predict",
" Probably not ",
" Stars say no ",
" For sure ",
" Why not? ",
" Why? "
}
function logo()
term.clear()
term.setCursorPos(1,1)
print(" _ _ _ __ __ _ ")
print(" ' ) ) ) ( ) / ) // / ")
print(" / / / __. _, o _. ./' /--< // __ _. /_ ")
print(" / ' (_(_/|_(_)_<_(__ (__) /___/_</_(_)(__/ <_ ")
print(" /| ")
print(" |/ ")
end
function start()
logo()
term.setCursorPos(1,7)
print(" .----------------. ")
print("Ask me ANY | .--------------. | Whether you ")
print("question, and | | ____ | | like it... ")
print("press ENTER | | .' __ '. | | ")
print("to receive | | | (__) | | | ")
print("your answer... | | .'____'. | | OR NOT... ")
print(" | | | (____) | | | ")
print(" | | '.______.' | | ")
print(" | | | | ")
print(" | '--------------' | ")
print(" '----------------' ")
end
function shake()
term.clear()
logo()
term.setCursorPos(1,7)
print(" .----------------. ")
print(" | .--------------. |")
print(" | | | |")
print(" | | | |")
print(" | | | |")
print(" | | | |")
print(" | | | |")
print(" | | | |")
print(" | | | |")
print(" | '--------------' |")
print(" '----------------' ")
sleep(.2)
term.clear()
logo()
term.setCursorPos(1,7)
print(" .----------------. ")
print(" | .--------------. |")
print(" | | | |")
print(" | | | |")
print(" | | | |")
print(" | | | |")
print(" | | | |")
print(" | | | |")
print(" | | | |")
print(" | '--------------' |")
print(" '----------------' ")
sleep(.2)
term.clear()
logo()
term.setCursorPos(1,7)
print(" .----------------. ")
print(" | .--------------. |")
print(" | | | |")
print(" | | | |")
print(" | | | |")
print(" | | | |")
print(" | | | |")
print(" | | | |")
print(" | | | |")
print(" | '--------------' |")
print(" '----------------' ")
sleep(.2)
term.clear()
logo()
term.setCursorPos(1,7)
print(" .----------------. ")
print(" | .--------------. |")
print(" | | | |")
print(" | | | |")
print(" | | | |")
print(" | | | |")
print(" | | | |")
print(" | | | |")
print(" | | | |")
print(" | '--------------' |")
print(" '----------------' ")
sleep(.2)
term.clear()
logo()
term.setCursorPos(1,7)
print(" .----------------. ")
print(" | .--------------. |")
print(" | | | |")
print(" | | | |")
print(" | | | |")
print(" | | | |")
print(" | | | |")
print(" | | | |")
print(" | | | |")
print(" | '--------------' |")
print(" '----------------' ")
sleep(.2)
term.clear()
logo()
term.setCursorPos(1,7)
print(" .----------------. ")
print(" | .--------------. |")
print(" | | | |")
print(" | | | |")
print(" | | | |")
print(" | | | |")
print(" | | | |")
print(" | | | |")
print(" | | | |")
print(" | '--------------' |")
print(" '----------------' ")
sleep(1.5)
ans()
end
function ans()
term.clear()
logo()
term.setCursorPos(1,7)
print(" .----------------. ")
print(" | .--------------. |")
print(" | | | |")
print(" | | | |")
print(" | | | |")
print(" | |"..answer[math.random(1,#answer)].."| |") -- 14 lines missing
print(" | | | |")
print(" | | | |")
print(" | | | |")
print(" | '--------------' |")
print(" '----------------' ")
end
start()
while true do
local event, p1 = os.pullEvent("key")
if p1 == 28 then
shake()
sleep(2)
start()
end
end
YOU WILL LOVE IT!