Advertisement
RyanDolan123

Manabe Madlibs Cheat System

Jun 25th, 2014
251
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //Manabe Madlibs (bit.ly/mnbmlibs) Cheat System
  2. //Made by your friend @ryandolan123
  3.  
  4. //EDIT 6/26/14: I fixed 2 major bugs in this. It should be fine now. Enjoy!
  5.  
  6. //To use, open up inspect element, open up the console, and paste this in
  7.  
  8. //To perform a cheat action, hit the new "change or view!" button
  9.  
  10. //To change the madlib to a specific different one, type the number of the madlib you want into the box and hit return
  11. //To view the madlib you are on, on the 2nd line of the alert it tells you which madlib you are on. Match that up with the corresponding madlib.
  12.  
  13. var changeMadlib = document.createElement("div"); //make cheat button
  14. var cmText = document.createTextNode("change or view!");
  15. changeMadlib.appendChild(cmText);
  16. changeMadlib.setAttribute("style","color: white; font-size: 200%; padding: 5px 15px; display: inline-block; cursor: pointer; background-color: rgb(0, 112, 175);");
  17.  
  18. var chunkStore = [
  19.     ["something went wrong, hit refresh or \"change or view\" please"], //why do javascript arrays have to start at 0, lets just have a safety net instead
  20.     ["verb","name","verb-ing","name2"],
  21.     ["name","food","object-pronoun","verb"],
  22.     ["verb","adjective"],
  23.     ["reaction","verb","name"],
  24.     ["name","human-adj","past-verb","object-pronoun"],
  25.     ["reaction","adverb","adjective"],
  26.     ["name","adverb","body-part","object-pronoun","his-her-its","body-part"],
  27.     ["verb-ing"],
  28.     ["number","plural-noun"],
  29.     ["verb-ing","thing"],
  30.     ["drink"],
  31.     ["tv-show-anime"],
  32.     ["manga-book-name"],
  33.     ["passive-verb"],
  34.     ["number","an-event"],
  35.     ["social-network","thing-from-internet"],
  36.     ["verb","name","adjective"],
  37. ];
  38.  
  39. changeMadlib.onclick = function() {
  40.     var promptMessage = "";
  41.     promptMessage += "Thanks for using @ryandolan123's manadlibs cheater\n";
  42.     if (typeof ml !== "undefined" && typeof ml.temp !== "undefined" && ml.temp > 0 && ml.temp < 18) {
  43.         promptMessage += "=======The current template is number " + ml.temp + "========\n";
  44.     } else if (typeof ml !== "undefined" && typeof ml.temp !== "undefined") {
  45.         promptMessage += "The current template is number " + ml.temp + ", which is unfortunately not recognized by this current cheat system.";
  46.     } else if (typeof ml !== "undefined" && typeof ml.temp === "undefined") {
  47.         promptMessage += "The current template is number.... uh.... my sources say the template number doesn't exist. blame @potasmic. see if there's a new version of this cheat system.";
  48.     }
  49.     promptMessage += "1 I tried to [[verb]] [[name]], but ended up [[verb-ing]] [[name2]] instead.\n";
  50.     promptMessage += "2 Today, [[name]] wants me to eat [[food]] but I refused, so [[object-pronoun]] [[verb]] it at me.\n";
  51.     promptMessage += "3 Minaho wanted me to [[verb]] him. I did, and it was [[adjective]]!\n";
  52.     promptMessage += "4 [[reaction]]! Why did you [[verb]] me, [[name]]?\n";
  53.     promptMessage += "5 [[name]] said I was [[human-adj]], so I [[past-verb]] [[object-pronoun]].\n";
  54.     promptMessage += "6 [[reaction]]! That was [[adverb]] [[adjective]]!\n";
  55.     promptMessage += "7 [[name]] hit me [[adverb]] in the [[body-part]]. So I hit [[object-pronoun]] back in [[his-her-its]] [[body-part]].\n";
  56.     promptMessage += "8 Stop [[verb-ing]] me!\n";
  57.     promptMessage += "9 There are [[number]] [[plural-noun]] here.\n";
  58.     promptMessage += "10 I don't have my glasses right now and it seems that I'm [[verb-ing]] a [[thing]]\n";
  59.     promptMessage += "11 Can you give me some of your [[drink]]?\n";
  60.     promptMessage += "12 Watching [[tv-show-anime]].";
  61.     promptMessage += "13 Reading [[manga-book-name]].\n";
  62.     promptMessage += "14 Feels like being [[passive-verb]]\n";
  63.     promptMessage += "15 Guess what? It's [[number]] days until [[an-event]]\n";
  64.     promptMessage += "16 Just logged into my [[social-network]] and the first thing I saw was [[thing-from-internet]]\n";
  65.     promptMessage += "17 I wanted to [[verb]] but [[name]] told me that was [[adjective]].";
  66.  
  67.     var choice = prompt(promptMessage,"");
  68.  
  69.     switch(Number(choice)) {
  70.  
  71.         case undefined: //ok fine hit cancel gosh
  72.  
  73.         //case NaN: alert("Please hit the cheat button again and this time input an actual number. thanks.");  //doesnt work wat
  74.         case 0: //adadsa
  75.  
  76.         default: if (choice > 17 || choice < 1 ) {
  77.             if (choice !== 0) {
  78.                 //alert("Please hit the cheat button again and this time use a valid number between 1 and 17.");
  79.             }
  80.         } else {
  81.             //its a legit number, lets roll
  82.  
  83.             var switchtomeplz = Number(choice);
  84.  
  85.             Manadlibs = function(a) {
  86.                 console.log("yolo swag");
  87.                 a.chunks = chunkStore[switchtomeplz];
  88.                 a.temp = switchtomeplz;
  89.                 a.limit = 9999
  90.                 this.data = a;
  91.                 this.chunks = this.data.chunks;
  92.                 this.temp = this.data.temp;
  93.                 this.limit = this.data.limit;
  94.  
  95.                 switchtomeplz = undefined; //dont leave a trace
  96.  
  97.                 Manadlibs = function(a) { //switch back to not cheat after doing it
  98.                     this.data = a;
  99.                     this.chunks = this.data.chunks;
  100.                     this.temp = this.data.temp;
  101.                     this.limit = this.data.limit;
  102.                 }
  103.             }
  104.  
  105.             loadTemplate(0);
  106.         }
  107.  
  108.     }
  109. }
  110.  
  111. var element = document.getElementsByClassName("container")[0];
  112. element.appendChild(changeMadlib);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement