Advertisement
Maxstripe

fortunecookie

Jan 18th, 2015
244
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. local yes = "Y"
  2. local items = {"A dubious friend may be an enemy in camouflage.", "A friend asks only for your time not your money.", "A new perspective will come with the new year.", "A golden egg of opportunity falls into your lap this month.", "All your hard work will soon pay off.", "A soft voice may be awfully persuasive.", "A friend is a present you give yourself.", "Depart not from the path which fate has you assigned.", "Do not be intimidated by the eloquence of others.", "Get your mind set, confidence will lead you on.", "Love is a warm fire to keep the soul warm.", "Long life is in store for you."}
  3. term.clear() --Clears screen and
  4. term.setCursorPos(1,1) --sets position
  5. write("Welcome! Would you like to take a fortune cookie? Y or N: ")
  6. input = read()
  7. if input == yes then
  8. print("Okay, here you go!")
  9. sleep(1)
  10. print(items[math.random(1, #items)]) -- Pick a random item
  11. sleep(3)
  12. os.shutdown()
  13. else
  14. print("Oh, okay then.")
  15. sleep(1)
  16. os.shutdown()
  17. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement