This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

A Day In The Life Of Alan

By: a guest on Jan 28th, 2012  |  syntax: Lua  |  size: 27.00 KB  |  views: 62  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. function BORINGENDING()
  2. io.write("\nFinally almost home you begin to walk up your driveway, when\nnothing happens.You feel like you've missed some opportunities today.\
  3. You ponder this as you eat you microwave dinner for one and watch a nightime film.\nMaybe tomorrow.\n\nPress any key to continue...\n")
  4. if defusedbomb==true then ending="HAVE A GO HERO"
  5. else ending="MOST BORING MAN ALIVE"
  6. end
  7. keyevent = "> Masturbated while crying"
  8. io.read()
  9. FINISH()
  10. end
  11.  
  12. function DEFECATEAGAIN()
  13. io.write("\nYou release your bowels in front of him.\nHe doesn't look particulary surprised.\
  14. The smell is incredible, so you decide to remove your trousers.\nWhile you do this the man sticks the needle in your arm, \nand you drift off to sleep...\n\nPress any key to continue...")
  15. if defecate==true then ending="TWICE A DAY MAN"
  16. else ending = "SHITTY CAT HATER"
  17. end
  18. io.read()
  19. keyevent= "> Crapped pants in front of mental health worker"
  20. FINISH()
  21. end
  22.  
  23. function GONICELY()
  24. io.write("\nYou agree to go nicely. He looks friendly and you love people.\nThey lead you away and take you to a special building where you spend the rest of the day.\
  25. \nPress any key to continue...\n")
  26. if (defecate==true) then ending="NERVOUS BREAKDOWN"
  27. else ending = "CAT HATER"
  28. end
  29. keyevent = "> Spent the day in a mental institution"
  30. io.read()
  31. FINISH()
  32. end
  33.  
  34. function EATFACE()
  35. io.write("\nYou approach him calmly, before leaping on him and eating his face.\nHe doesn't have a moment to react and the syringe falls uselessly to the floor.\
  36. You deal with his friends just as easily.\nYou wrap up their bodies and place them in your freezer for a meal another day.\
  37. \nYou spend the rest of the day relaxing.\n\nPress any key to continue...\n")
  38. ending = "BATSHIT CRAZY"
  39. keyevent = "> Ate a man's face"
  40. io.read()
  41. FINISH()
  42. end
  43.  
  44. function WHITECOATBATTLE()
  45. io.write("n\n_____________________________________________________________________________\
  46. WHITE COAT BATTLE\n_____________________________________________________________________________\n\
  47. Finally almost home you begin to walk up your driveway, when you\nhear a shout behind you. It's a nice looking man with a syringe, he wants you\n to go with him.\
  48. You:\n\na)Eat his face\nb)Go with him\nc)Defecate yourself\n")
  49. optA, optB, optC, choA, choB, choC = "a", "b", "c", "EATFACE", "GONICELY", "DEFECATEAGAIN"
  50. _G[entrytest(optA, optB, optC, choA, choB, choC)]()
  51. end
  52.  
  53. function GANGWIN()
  54. io.write("\nThe bullets land in the big truck nearby.\nThe explosion is blinding as the gang and half the street is consumed by fire.\
  55. You brush your hands satisfied (you'll apologise to the neighbours tomorrow) and head indoors.\nYou spend the rest of the day relaxing\
  56. \nPress any key to continue...")
  57. io.read()
  58. ending = "VIGILANTE"
  59. keyevent = "> Took out an entire criminal gang"
  60. FINISH()
  61. end
  62.  
  63. function GUNSUICIDE()
  64. io.write("\nTo everyone's surprise, you turn the gun on your self and pull the trigger.\
  65. You experience a brief moment of satisfaction from the look on their faces.\n\nPress any key to continue...")
  66. death = "Shot yourself in the face"
  67. io.read()
  68. DEAD()
  69. end
  70.  
  71. function GANGDEATH()
  72. io.write("/nYou fire your one bullet at the gang. You manage to strike one of them!\nJust when they're about to flee they hear the dry clicking of your weapon.\
  73. They know you're out of bullets.\nThe beating is brutal and bloody, but luckily, you eventually pass out.\n\nPress any key to continue...")
  74. death = "Beaten to death by gang"
  75. io.read()
  76. DEAD()
  77. end
  78.  
  79. function GANGBATTLE()
  80. io.write("\n\n_____________________________________________________________________________\
  81. GANG BATTLE\n_____________________________________________________________________________\n\
  82. Finally almost home you begin to walk up your driveway, when you hear\na shout behind you. You spin round to be faced with a gang of men in ski masks.\
  83. They also appear to be armed with spiked baseball bats.\nYou whip out the gun from earlier, it has one bullet left.\You\
  84. \na)Shoot them\nb)Shoot yourself\nc)Shoot big red truck\n")
  85. optA, optB, optC, choA, choB, choC = "a", "b", "c", "GANGDEATH", "GUNSUICIDE", "GANGWIN"
  86. _G[entrytest(optA, optB, optC, choA, choB, choC)]()
  87. end
  88.  
  89. function SWATWIN()
  90. io.write("\nThe bullets land in the big truck nearby.\nThe explosion is blinding as the police and half the street is consumed by fire.\
  91. You brush your hands satisfied (you'll apologise to the neighbours tomorrow) and head indoors.\nYou spend the rest of the day relaxing\
  92. \nPress any key to continue...")
  93. io.read()
  94. ending = "LAWLESS"
  95. keyevent = "> Vapourised a SWAT team"
  96. FINISH()
  97. end
  98.  
  99. function SWATDEATH()
  100. io.write("\nYou begin to laugh as you fire at the SWAT team.\nIt appears to be ineffective as the bullets completely miss or hit their\narmoured vehicles.\
  101. You start to slowly put your hands in the air, before your life\nis suddenly and violently ended by a sniper bullet.\n\nPress any key to continue...")
  102. death = "Shot by police sniper"
  103. io.read()
  104. DEAD()
  105. end
  106.  
  107. function POLICEBATTLE()
  108. io.write("\n_____________________________________________________________________________\
  109. POLICE BATTLE\n_____________________________________________________________________________\n\
  110. Finally almost home you begin to walk up your driveway, when you hear a shout\nbehind you. It's now you realise an entire SWAT team is crouching behind cars\nin the street.\
  111. It becomes apparent they are displeased with the generally murderous day you've had. Seeing no choice, you whip out your gun and\n\
  112. a)Shoot SWAT team\nb)Shoot into back of SWAT van\nc)Shoot big red truck nearby\n")
  113. optA, optB, optC, choA, choB, choC = "a", "b", "c", "SWATDEATH", "SWATDEATH", "SWATWIN"
  114. _G[entrytest(optA, optB, optC, choA, choB, choC)]()
  115. end
  116.  
  117. function GRANNYWIN()
  118. io.write("\nWith an inspired moment of accuracy, you hurl the brick at her handbag.\nShe looks down briefy in terror before she explodes.\
  119. You stand there shocked as bits of old lady rain down into your garden.\nYou'll later discover she was a terrorist serial killer granny, but that's all for another day.\
  120. \nYou enter your house, and relax for the rest of the day.\n\nPress any key to continue...");
  121. ending = ("GRANNY BASHER")
  122. keyevent = ("> You killed a serial killer terrorist")
  123. io.read()
  124. FINISH()
  125. end
  126.  
  127. function BRICKAIRDEATH()
  128. io.write("\nWith a triumphant shout you hurl the brick into the air.\nYou both watch in amazement as the brick lands pointlessly in the road a few seconds later.\
  129. \nShe simply grins dentured teeth before leaping through the air.\nBefore you can move she has plunged the knife into your chest.\
  130. You collapse onto the floor and sweet unconsciousness takes you.\n\nPress any key to continue...")
  131. death = ("Murdered by Granny")
  132. DEAD()
  133. end
  134.  
  135. function BRICKFACEDEATH()
  136. io.write("\nWith a grunt of effort you hurl the brick at her face.\nIncredibly, you don't miss. Even more incrediblely, it bounces uselessly off.\
  137. She simply grins dentured teeth before leaping through the air.\nBefore you can move she has plunged the knife into your chest.\
  138. You collapse onto the floor and sweet unconsciousness takes you.\n\nPress any key to continue...")
  139. death = ("Murdered by Granny")
  140. DEAD()
  141. end
  142.  
  143. function GETBRICK()
  144. io.write("\nYou reach down slowly and grab the brick. The old lady starts towards you\nwaving the knife from side to side.\nYou:\n\na)Throw the brick at her face\nb)Throw brick into the air\nc)Throw brick at her handbag\n")
  145. optA, optB, optC, choA, choB, choC = "a", "b", "c", "BRICKFACEDEATH", "BRICKAIRDEATH", "GRANNYWIN"
  146. _G[entrytest(optA, optB, optC, choA, choB, choC)]()
  147. end
  148.  
  149. function RUNDEATH()
  150. io.write("\nYou turn to run, hoping to flee indoors and lock this crazy situation out.\nTurning your back, however, was a mistake.\
  151. You hear a flurry of movement and suddenly you feel tiny old hands on your neck.\nYou feel a sharp and sudden pain and slip into sweet unconsciousness.\
  152. \nPress any key to continue...");
  153. death = "Murdered by Granny"
  154. DEAD()
  155. end
  156.  
  157. function MAILBOXDEATH()
  158. io.write("\nYou turn and open your mailbox, hoping to find something to resolve the situation with.\nUnfortunately, there's only some letters.\
  159. \nYou feel a sharp pain in your side and look down to see a knife being\nclutched by old hands sinking slowly in. You slip into sweet unconsciousness.\
  160. \nPress any key to continue....")
  161. io.read();
  162. death = "Murdered by Granny"
  163. DEAD()
  164. end
  165.  
  166. function GRANNYBATTLE()
  167. io.write("\n_____________________________________________________________________________\
  168. GRANNY BATTLE\n_____________________________________________________________________________\n\
  169. Finally almost home you begin to walk up your driveway, when you hear a shout behind you.\nIt's the old lady you walked home. She no longer looks sweet.\
  170. With a dark and manic look on her face, she pulls a knife from her handbag.\n She begins to walk towards you. You glance around.\
  171. You are standing next to your mailbox, there's a brick on the floor and your house is behind you.\nWhat do you do?\n\na)Check mailbox\nb)Pickup brick\nc)Run into house\n");
  172. optA, optB, optC, choA, choB, choC = "a", "b", "c", "MAILBOXDEATH", "GETBRICK", "RUNDEATH"
  173. _G[entrytest(optA, optB, optC, choA, choB, choC)]()
  174. end
  175.  
  176. function FINALBATTLE()
  177.         if (walkedladyhome==true and defusedbomb==true) then
  178.                 GRANNYBATTLE()
  179.         elseif (shootoutbad==true) or (murderedboss==true) then
  180.                 POLICEBATTLE()
  181.         elseif (shootoutgood==true) then
  182.                 GANGBATTLE()
  183.         elseif (atecat==true) or (defecate==true) then
  184.                 WHITECOATBATTLE()
  185.         else
  186.                 BORINGENDING()
  187.         end
  188. end
  189.  
  190. function RUNAWAY()
  191. io.write("\nYou drop the pliers and run through the crowd.\nYou hear an explosion in the distance, the guilt is another day's worry.\
  192. You are finally nearly home.\n\n\Press any key to continue...")
  193. io.read()
  194. FINALBATTLE()
  195. end
  196.  
  197. function BLUEDEATH()
  198. io.write("\nFortunately, when you slice down on the blue wire, death is almost instantaneous\n\n\nPress any key to continue...")
  199. io.read()
  200. death = "Being grossly underqualified"
  201. DEAD()
  202. end
  203.  
  204. function RED()
  205. defusedbomb = true
  206. io.write("\nWondering how this situation was forced upon you\n(and also wondering why the hell there's a crowd)\nyou cut the red wire... and the bomb stops.\
  207. There's an explosion of applause. You grin sheepishly as you are cheered.\nAs you leave the scene you spot the old lady you saw on the bus.\nShe looks put off by something...\
  208. \n\nPress any key to continue...")
  209. io.read()
  210. FINALBATTLE()
  211. end
  212.  
  213. function FINISHWORK()
  214. io.write("\nYou leave your work building and wander towards a small crowd nearby.\nAs you push to the front a terrified woman presses something into your hand.\
  215. You realise it's some pliers. Someone else pushes you forward.\nBefore you is a steadily counting down explosive device. You:\n\na)Cut the red wire\nb)Cut the blue wire\nc)Run away\n")
  216. optA, optB, optC, choA, choB, choC = "a", "b", "c", "RED", "BLUEDEATH", "RUNAWAY"
  217. _G[entrytest(optA, optB, optC, choA, choB, choC)]()
  218. end
  219.  
  220. function EATCAT()
  221. atecat = true
  222. io.write("\nAs your boss speaks to you, you snatch up his cat as it trys to pass.\nBefore he can react, you immediatly rip it's head off with your teeth. He appears to go into shock.\n\nThus, allowing you to quietly slip away from work early.\n\nPress any key to continue...\n")
  223. io.read();
  224. FINISHWORK()
  225. end
  226.  
  227. function PUNCHBOSS()
  228. murderedboss = true
  229. io.write("\nDriven by rage, you smash your stunned boss in the face.\nHe tumbles backwards and falls through the glass window.\
  230. You hear muffled screams below as the body hits the ground floor.\nYou decide to leave work for the day...\n\nPress any key to continue...\n");
  231. io.read();
  232. FINISHWORK()
  233. end
  234.  
  235. function WINDOWSUICIDE()
  236. io.write("\nYou scream at him and gain a moment of pleasure from\nhis terrifed face.You spin round and throw yourself\
  237. through the glass window. Unfortunately you are on the top floor.\n\nPress any key to continue...")
  238. death = "Driven to suicide by boss"
  239. DEAD();
  240. end
  241.  
  242. function SHOUTBACK()
  243. io.write("\nYou begin to immediatly explode in his face, spittle flying everywhere.\nYou rant for a few minutes while he stands there speechless.\
  244. The rant closes with a dramatic slam of your fist on the table.\nSurprisingly, rather than being angry, the boss is extremely impressed.\
  245. You respond to this by:\n\na)Punching him in the face\nb)Finishing the workday\nc)Throwing yourself through the window\n");
  246. optA, optB, optC, choA, choB, choC = "a", "b", "c", "PUNCHBOSS", "FINISHWORK", "WINDOWSUICIDE"
  247. _G[entrytest(optA, optB, optC, choA, choB, choC)]()
  248. end
  249.  
  250. function APOLOGISE()
  251. gotfired = true
  252. io.write("\nYou stammer through a weak apology. This only makes him angrier.\nHe fires you on the spot. You respond by:\n\na)Punching him in the face\nb)Leaving quietly\
  253. c)Throwing yourself through the window\n")
  254. optA, optB, optC, choA, choB, choC = "a", "b", "c", "PUNCHBOSS", "FINISHWORK", "WINDOWSUICIDE"
  255. _G[entrytest(optA, optB, optC, choA, choB, choC)]()
  256. end
  257.  
  258. function WINSHOOTOUT()
  259. shootoutgood = true
  260. io.write("\nApparently you were Rambo in a previous life.\nWhen the smoke clears, you can see the bullet-ridden\nbodies of the gunmen. You will never know why they were here.\
  261. With this dealt with, you head into your office building. The boss is waiting.\nHe starts shouting at you for being late. You:\n\
  262. a)Shout back\nb)Apologise\nc)Eat his cat\n")
  263. optA, optB, optC, choA, choB, choC = "a", "b", "c", "SHOUTBACK", "APOLOGISE", "EATCAT"
  264. _G[entrytest(optA, optB, optC, choA, choB, choC)]()
  265. end
  266.  
  267. function WORKALT()
  268. io.write("\n_____________________________________________________________________________\n\n");
  269.         if defecate==true then
  270.         io.write("You finally manage to get into your work building. The boss is waiting.\nHe starts shouting at you for being late.\nWhen he gets closer he becomes much quieter though.\
  271. He looks at you like you are insane. Oh well.\nThe squishy trousers are strangely comforting.\nNo-one bothers you for the rest of the day.\n\nPress any key to continue...")
  272.         io.read()
  273.         FINALBATTLE()
  274.         else
  275.         io.write("You finally manage to get into your work building. The boss is waiting.\nHe starts shouting at you for being late. You:\n\
  276. a)Shout back\nb)Apologise\nc)Eat his cat\n")
  277.         optA, optB, optC, choA, choB, choC = "a", "b", "c", "SHOUTBACK", "APOLOGISE", "EATCAT"
  278.         _G[entrytest(optA, optB, optC, choA, choB, choC)]()
  279.         end
  280. end
  281.  
  282. function SURRENDERDEATH()
  283. io.write("\nYou drop the gun and sheepishly raise your hands.\nThe gunmen reach you, they don't look pleased.\
  284. You try telling a joke. They shoot you in the face.\n\nPress any key to continue...")
  285. death = "Belief in forgiveness"
  286. DEAD()
  287. end
  288.  
  289. function BARRELDEATH()
  290. io.write("\nSmiling gleefully, you turn the gun and pump some shots into the barrels\nas the men run past them.\
  291. Unfortunately, and not unsurprisingly, nothing happens.\nThe gunmen open fire and riddle your body with bullets.\n\nPress any key to continue...")
  292. death = "Belief in movie logic"
  293. DEAD()
  294. end
  295.  
  296. function GUNFIGHT()
  297. io.write("\nTo everyones surprise, you swipe the gun from the assailants hand.\nHis eyes widen in shock as you laugh manically and open fire.\
  298. As you blast away the first gunman, two more rush out the building towards you.\nYou:\n\na)Shoot the barrels near them\nb)Continue firing\nc)Surrender\n");
  299. optA, optB, optC, choA, choB, choC = "a", "b", "c", "BARRELDEATH", "WINSHOOTOUT", "SURRENDERDEATH"
  300. _G[entrytest(optA, optB, optC, choA, choB, choC)]()
  301. end
  302.  
  303. function KARATEDEATH()
  304. io.write("\nYou scream out wildly and smash your hand down on the assailants neck.\n\
  305. You experience a brilliant but brief moment of valiant victory before\n the shotgun goes off. You collapse slowly onto the pavement\nand stare down at the hole in your mid-section.\n\
  306. Press any key to continue...")
  307. death = "Too many kung-fu movies"
  308. DEAD()
  309. end
  310.  
  311. function SURRENDER()
  312. surrendedgood = true
  313. io.write("\nYou collapse onto the floor, weeping uncontrollably.\nEven the gunman seems embarrassed. He yells a couple of\nunecessary threats in your direction and you cry even\
  314. harder. Eventually they leave (with your pride), and you manage to crawl to work\n\nPress any key to continue...");
  315. io.read()
  316. WORKALT()
  317. end
  318.  
  319. function ARRIVEATWORK()
  320.         if defecate==true then
  321.                 io.write("\nAs you walk up to your place of work, you realise something is wrong.\
  322. You feel a small bit of smug satisfaction in being right as a masked man puts a gun in your face\n\nHowever, on approach he sniffs the air from your general area and pulls a face.\
  323. He hesitates uncertainly before turning and fleeing. Problem solved!")
  324.                 io.read()
  325.                 WORKALT()
  326.  
  327.                 else
  328.  
  329.                 io.write("\nAs you walk up to your place of work, you realise something is wrong.\
  330. You feel a small bit of smug satisfaction in being right as a masked man puts a gun in your face\
  331. \nYou:\na)Snatch the gun out of his hands and shoot him\nb)Karate chop him on the neck\nc)Surrender\n")
  332.                 optA, optB, optC, choA, choB, choC = "a", "b", "c", "GUNFIGHT", "KARATEDEATH", "SURRENDER"
  333.                 _G[entrytest(optA, optB, optC, choA, choB, choC)]()
  334.         end
  335. end
  336.  
  337. function TEADEATH()
  338. io.write("\nYou sit down in living room among her cluttered furniture. The old lady hands\nyou tea and you begin to drink gratefully.\
  339. It tastes slightly of bitter almonds.\n\nAs darkness begins descends on your vision and the smiling granny stares at you,\
  340. you wonder vaguely how it came to this.\
  341. \n\nPress any key to continue");
  342. death = "Old Lady Serial Killer"
  343. DEAD()
  344. end
  345.  
  346. function WALKHOME()
  347. walkedladyhome = true
  348. io.write("\nYou walk with her as she hobbles along the pavement, \neventually reaching her house. At her doorstop she turns to you and insists she makes you some tea to repay your kindness.\n\nYou reply:\na)'Gladly!'\nb)'Only if it's quick...'\nc)'Sorry, I'm late for work'\n")
  349. optA, optB, optC, choA, choB, choC = "a", "b", "c", "TEADEATH", "TEADEATH", "ARRIVEATWORK"
  350. _G[entrytest(optA, optB, optC, choA, choB, choC)]()
  351. end
  352.  
  353. function OLDLADY()
  354. io.write("\nYou sit down next to the old woman who immediatly begins to talk to you about\nher grandson.You listen amicably for what seems like an eternity, before the\nbus pulls over at her stop.\
  355. She smiles at you and asks if you will walk her home as she has a bad hip.\nYou respond:\n\na)'Sure, no problem'\nb)'Sorry, I'm late for work'\n")
  356. optA, optB, optC, choA, choB, choC = "a", "b", nil, "WALKHOME", "ARRIVEATWORK", nil
  357. _G[entrytest(optA, optB, optC, choA, choB, choC)]()
  358. end
  359.  
  360. function MURDERED()
  361. io.write("'Yes there are. You just never learned them.' He correctly quips back.\nThen he stabs you.\n\nPress any key to continue...");
  362. death = "Monkey Island quotes"
  363. DEAD()
  364. end
  365.  
  366. function SHOT()
  367. io.write("As they climb out their vehicle, you fire a warning shot into the air.\nThey react instantly, unholstering their weapons and returning fire.\
  368. You don't get a chance to take cover.\nAs you fall to the floor mortally wounded, you wonder how the hell\nyou got here.\n\n\Press any key to continue...");
  369. io.read()
  370. death = "Shot dead by Sonny Bonds"
  371. DEAD()
  372. end
  373.  
  374. function RAIDWIN()
  375. shootoutbad = true
  376. io.write("You fire at the police car, forcing them to dive and take cover.\nYour partners in crime rush out and you make a quick getaway.\
  377. Somehow, you are still alive. In addition, you have gained a share of the loot.\nThey are even nice enough to drop you off outside work.\n\nPress any key to continue...")
  378. io.read()
  379. WORKALT()
  380. end
  381.  
  382. function JAIL()
  383. surrendedbad = true
  384. io.write("You scream like a girl and throw down your weapons.\nThe police immediatly arrest you.\
  385. You spend the rest of the day in a police cell.\n\nPress any key to continue...");
  386. io.read()
  387. ending = ("CONFUSED COWARD")
  388. keyevent = ("> Spent day in prison")
  389. FINISH()
  390. end
  391.  
  392. function JOINRAID()
  393. io.write("\nNo-one is more surprised than you when he nods.\nHe slips you a gun. Before you know it, you're standing\noutside a van keeping watch while three men raid a store.\
  394. A police patrol car pulls up, you:\n\na)Shoot them\nb)Fire a warning shot\nc)Surrender\n");
  395. optA, optB, optC, choA, choB, choC = "a", "b", "c", "RAIDWIN", "SHOT", "JAIL"
  396. _G[entrytest(optA, optB, optC, choA, choB, choC)]()
  397. end
  398.  
  399. function FLEE()
  400. gayremarks = true
  401. io.write("\nYou land face first on the pavement. As you pick yourself up\nyou glimpse the man glaring at you from the moving bus.\
  402. The old lady has got off with you, she offers a cup of tea to\nmake you feel better. You respond:\n\na)'Thank you, I shall'\nb)'You are so kind'\nc)'Sorry, I'm late for work'\n")
  403. optA, optB, optC, choA, choB, choC = "a", "b", "c", "TEADEATH", "TEADEATH", "ARRIVEATWORK"
  404. _G[entrytest(optA, optB, optC, choA, choB, choC)]()
  405. end
  406.  
  407. function ANGRYMAN()
  408. io.write("You sit down nervously to the angry looking man. As you reach into\
  409. your pocket, you accidently grab his arm, forcing you\nto say something. You say\n\na)'There are no words for how disgusting you are'\nb)'Listen, I know. I want in'\
  410. c)'I could pleasure you all night for a small fee'\n");
  411. optA, optB, optC, choA, choB, choC = "a", "b", "c", "MURDERED", "JOINRAID", "FLEE"
  412. _G[entrytest(optA, optB, optC, choA, choB, choC)]()
  413. end
  414.  
  415. function DEFECATE()
  416. defecate = true
  417. io.write("\nTo everyone's surprise, you suddenly release your bowels into your trousers.\nThe smell is unbearable, but you pretend not to notice.\
  418. Some people look guenuinely terrifed.\n No one bothers you to the journey into work\n\n\nPress any key to continue...")
  419. io.read()
  420. ARRIVEATWORK()
  421. end
  422.  
  423. function WORK()
  424. io.write("\nYou scramble out of the house in a hurry.\nThe day is typically dreary. A woman scowls at you as you manoeuvre\
  425. past her large frame and manage to leap onto the bus before the doors close.\nThe driver looks unimpressed as you glance around for a seat.\n\n\
  426. Where should you sit?\na)Next to the nice looking old lady\nb)Next to the angry looking man\nc)Defecate yourself\n")
  427. optA, optB, optC, choA, choB, choC = "a", "b", "c", "OLDLADY", "ANGRYMAN", "DEFECATE"
  428. _G[entrytest(optA, optB, optC, choA, choB, choC)]()
  429. end
  430.  
  431. function SLEEP()
  432. print("\nYou decide to go back to sleep.\nYou spend the rest of the day snoozing on and off, never leaving your bed.\nYou wonder vaguely if you're depressed\
  433. \nPress any key to continue...")
  434. ending = ("DEPRESSED")
  435. keyevent = ("> Slept all day")
  436. io.read()
  437. FINISH()
  438. end
  439.  
  440. function LOCAL()
  441. io.write("\nIt's just some rubbsh about a neighbour complaining about a big red truck on your street.\
  442. Apparently it contains some potentially combustable chemicals and he wants it moved.\nYou finish reading and head out for work.\n\nPress any key to continue...")
  443. io.read()
  444. WORK()
  445. end
  446.  
  447. function DISPOSAL()
  448. io.write("\nIt's a fascinating artcle about the secrets of disarming bombs.\nApparently it's all a sham as you only need to cut the red wire. Interesting!\
  449. You finish reading and head out for work.\n\nPress any key to continue...")
  450. io.read()
  451. WORK()
  452. end
  453.  
  454. function VIOLENCE()
  455. io.write("\nIt's a depressing read about a recent spate of robberies,\nmissing persons and bomb threats. Apparently, police\nhave no leads.\
  456. You finish reading and head out for work.\n\nPress any key to continue...")
  457. io.read()
  458. WORK()
  459. end
  460.  
  461. function READ()
  462. readpaper = true
  463. io.write("\nYou decide there's time for a quick read of the morning paper.\
  464. There are three potentially interesting articles:\na)Local Neighbour Complains\nb)Secrets of Bomb Disposal\nc)Violence in the City\n")
  465. optA, optB, optC, choA, choB, choC = "a", "b", "c", "LOCAL", "DISPOSAL", "VIOLENCE"
  466. _G[entrytest(optA, optB, optC, choA, choB, choC)]()
  467. end
  468.  
  469. function START()
  470. readpaper = false
  471. defecate = false
  472. walkedladyhome = false
  473. gayremarks = false
  474. shootoutgood = false
  475. shootoutbad = false
  476. surrendedgood = false
  477. surrendedbad = false
  478. murderedboss = false
  479. atecat = false
  480. defusedbomb = ""
  481. gotfired = false
  482. ending = false
  483. death = ""
  484. keyevent = ""
  485.  
  486. io.write("\a\nTHE MORNING\n\nYou awake to the bleary and irritating sound that can only be an alarm clock.\
  487. You roll out of bed, ready for another exciting day.\
  488. What do you want to do?\n\na) Go back to sleep\nb) Read the paper\nc) Go to work\n");
  489. optA, optB, optC, choA, choB, choC = "a", "b", "c", "SLEEP", "READ", "WORK"
  490. _G[entrytest(optA, optB, optC, choA, choB, choC)]()
  491. end
  492.  
  493. function HELP()
  494. print("\nYou must help guide Alan through a day of his life. Unfortunately he's a pretty ordinary guy.\n\
  495. You can do this by choosing between the options he has in a given moment\
  496. Type the letters a, b or c to make a choice.\nIf you're still alive at the end, it's a good sign.\
  497. There are 11 endings in total!\n\n Type start to play the game.")
  498. _G[entrytest(optA, optB, optC, choA, choB, choC)]()
  499. end
  500.  
  501. function SECRET()
  502. io.write("Yes, that's me!\nSorry, this page only exists as it was easier to leave than write extra code\nApologies\nxx\n")
  503. _G[entrytest(optA, optB, optC, choA, choB, choC)]()
  504. end
  505.  
  506. function entrytest(optA, optB, optC, choA, choB, choC)
  507. repeat
  508. entry = io.read()
  509. entry = string.lower(entry)
  510. until entry==(optA) or entry==(optB) or entry==(optC)
  511. io.write("\n_____________________________________________________________________________\n\n");
  512.  
  513.         if entry==(optA) then return(choA)
  514.                 elseif entry==(optB) then return(choB)
  515.                 else return(choC)
  516. end
  517. end
  518.  
  519. function FINISH()
  520. io.write("\n_____________________________________________________________________________\n\n");
  521. print("\nCONGRATULATIONS\nYOU HAVE FINISHED THE DAY ALIVE\n\nYou have recieved the ending: [[" .. ending .. "]]\n\nThe things that happened in your day:");
  522. if readpaper==true then print("> You read the morning paper") end
  523. if defecate==true then print("> Crapped your pants on the bus") end
  524. if walkedladyhome==true then print("> You walked an old lady home") end
  525. if gayremarks==true then print("> You angered the gay community") end
  526. if shootoutbad==true then print ("> You aided a robbery, and shot at policemen") end
  527. if shootoutgood==true then print("> You shot dead three armed robbers") end
  528. if surrendedgood==true then print("> You cowered in fear in face of danger") end
  529. if surrendedbad==true then print("> You cowered in fear in face of the law") end
  530. if murderedboss==true then print("> You murdered your boss in cold blood") end
  531. if atecat==true then print("> You ate your bosses cat") end
  532. if defusedbomb==true then print("> You defused a terrorist explosive device") end
  533. if defusedbomb==false then print ("> You fled in terror from responsibility") end
  534. if gotfired==true then print("> You got fired from your job") end
  535. print(keyevent)
  536. print("\nWELL DONE.\nType start to play again")
  537. optA, optB, optC, choA, choB, choC = "start", "help", "Ontogenesis", "START", "HELP", "SECRET"
  538. _G[entrytest(optA, optB, optC, choA, choB, choC)]()
  539. end
  540.  
  541. function DEAD()
  542. io.read();
  543. io.write("\n_____________________________________________________________________________\n\n");
  544. print("YOU ARE DEAD.\n\nYou were killed by: " .. death .. "\n\nSorry about that. Type start to try again\n")
  545. io.write("_____________________________________________________________________________\n\n");
  546. optA, optB, optC, choA, choB, choC = "start", "help", "Ontogenesis", "START", "HELP", "SECRET"
  547. _G[entrytest(optA, optB, optC, choA, choB, choC)]()
  548. end
  549.  
  550. io.write("A DAY IN THE LIFE OF ALAN\n\ncreated by Ontogenesis\n\n\nTo start the game, type 'start'\nfor instructions, type 'help'\n");
  551. optA, optB, optC, choA, choB, choC = "start", "help", "Ontogenesis", "START", "HELP", "SECRET"
  552. _G[entrytest(optA, optB, optC, choA, choB, choC)]()
clone this paste RAW Paste Data