Advertisement
Index154

acronymcode

Jan 22nd, 2020
239
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.95 KB | None | 0 0
  1. note = "input is the user query after the command";
  2.  
  3. upnext = "Remove anything that's not an uppercase letter from the input and replace letters with special sequences used later on";
  4. input = input.replace(/[^A-Z]/g,"");
  5. input = input.replace(/A/g,"#a#");
  6. input = input.replace(/B/g,"#b#");
  7. input = input.replace(/C/g,"#c#");
  8. input = input.replace(/D/g,"#d#");
  9. input = input.replace(/E/g,"#e#");
  10. input = input.replace(/F/g,"#f#");
  11. input = input.replace(/G/g,"#g#");
  12. input = input.replace(/H/g,"#h#");
  13. input = input.replace(/I/g,"#i#");
  14. input = input.replace(/J/g,"#j#");
  15. input = input.replace(/K/g,"#k#");
  16. input = input.replace(/L/g,"#l#");
  17. input = input.replace(/M/g,"#m#");
  18. input = input.replace(/N/g,"#n#");
  19. input = input.replace(/O/g,"#o#");
  20. input = input.replace(/P/g,"#p#");
  21. input = input.replace(/Q/g,"#q#");
  22. input = input.replace(/R/g,"#r#");
  23. input = input.replace(/S/g,"#s#");
  24. input = input.replace(/T/g,"#t#");
  25. input = input.replace(/U/g,"#u#");
  26. input = input.replace(/V/g,"#v#");
  27. input = input.replace(/W/g,"#w#");
  28. input = input.replace(/X/g,"#x#");
  29. input = input.replace(/Y/g,"#y#");
  30. input = input.replace(/Z/g,"#z#");
  31.  
  32. upnext = "Check if there is any useable input left";
  33. correctInput = "true";
  34. if(input == ""){
  35. correctInput = "false";
  36. }
  37.  
  38. upnext = "Set up arrays with words for every letter of the alphabet";
  39. a = ['Axe ', 'Anger ', 'Ass ', 'Ant ', 'Amazing ', 'Automatic ', 'Autism ', 'Angry ', 'Apple ', 'Attack ', 'Admin '];
  40. b = ['Book ', 'Bowl ', 'Boob ', 'Butt ', 'Boing ', 'Boots ', 'Butter ', 'Boring ', 'Bomb ', 'Bunnster ', 'Bimbus ', 'Bot ', 'Bun ', 'Blessed '];
  41. c = ['Charge ', 'Crack ', 'Cow ', 'Coins ', 'Cock ', 'Cancer ', 'Catapult ', 'Critical ', 'Christian ', 'Cheese ', 'Cracker ', 'Cunty ', 'Country ', 'Crap ', 'Cursed ', 'Chink ', 'Chonker '];
  42. d = ['Duck ', 'Dawn ', 'Dick ', 'Dooting ', 'Dude ', 'Dream ', 'Dogs ', 'Doggo ', 'Dreamer ', 'Dumb ', 'Doofus '];
  43. e = ['Eternity ', 'Elephant ', 'Egg ', 'E ', 'Eternal ', 'Eating ', 'Electrical ', 'Endless '];
  44. f = ['France ', 'Fart ', 'Fucker ', 'Fun ', 'Funny ', 'Fucking ', 'Fish ', 'Frog ', 'Following ', 'Fruity '];
  45. g = ['Goose ', 'Gun ', 'Good ', 'Gorgeous ', 'Going ', 'Greenery', 'Gong ', 'Greatness ', 'Gogo '];
  46. h = ['Hand ', 'House ', 'Honey ', 'Hitting ', 'Hot ', 'Help ', 'Helping ', 'Hunter '];
  47. i = ['Island ', 'Ink ', 'Infinity ', 'Infinite ', 'Irish ', 'Index ', 'Indian ', 'Igloo '];
  48. j = ['Janitor ', 'Joke ', 'Jack o\' Pumpkin ', 'Jobless ', 'Jacker ', 'Junk '];
  49. k = ['Kangaroo ', 'Karate ', 'Killer ', 'Killing ', 'King ', 'Komodo '];
  50. l = ['Lamp ', 'Love ', 'Looting ', 'Loser ', 'Lewd ', 'Link ', 'Laughing '];
  51. m = ['Man ', 'Mouse ', 'Mr. Win ', 'Money ', 'Making ', 'More ', 'Mister '];
  52. n = ['Nut ', 'Noon ', 'And ', 'Nutting ', 'Nutty ', 'Nude ', 'Nani '];
  53. o = ['Orange ', 'Oofing ', 'Oofer ', 'Ogre ', 'Onion ', 'Of ', 'Odorless '];
  54. p = ['Poop ', 'Power ', 'Peeing ', 'Porn ', 'Pope ', 'Perfect ', 'Penguin '];
  55. q = ['Question ', 'Quest ', 'Quantum ', 'Quaking ', 'Quacking ', 'Qutie '];
  56. r = ['Road ', 'Rooster ', 'Rolling ', 'Rescue ', 'Round ', 'Royalty ', 'Reality '];
  57. s = ['Street ', 'Soup ', 'Sprag ', 'Slime ', 'Square ', 'Stalking ', 'Stinky ', 'Super '];
  58. t = ['Tiddy ', 'Town ', 'Truth ', 'Total ', 'Training ', 'Trumo ', 'Trumpet ', 'Tower ', 'Trunk '];
  59. u = ['Universe ', 'Underground ', 'Undertale ', 'Uno ', 'Underwear ', 'Usurper '];
  60. v = ['Villa ', 'Vote ', 'Voodoo ', 'Villager ', 'Very ', 'Vandalism ', 'Viking '];
  61. w = ['World ', 'Week ', 'Weirdness ', 'Woof ', 'Windows ', 'Washing ', 'Wiener '];
  62. x = ['Xylophone ', 'Xenophobe ', 'Experience ', 'X '];
  63. y = ['Yearly ', 'Yeet ', 'Yoker ', 'Yonk ', 'Yutus ', 'Yanny ', 'Yoker '];
  64. z = ['Zombie ', 'Zoo ', 'Zone ', 'Zebra ', 'Zelda ', 'Zinkus '];
  65.  
  66. upnext = "Replace letters in the input with random words from the arrays";
  67. output = input;
  68. output = output.replace(/#a#/,a[Math.floor(Math.random() * (a.length - 1))]);
  69. output = output.replace(/#b#/,b[Math.floor(Math.random() * (b.length - 1))]);
  70. output = output.replace(/#c#/,c[Math.floor(Math.random() * (c.length - 1))]);
  71. output = output.replace(/#d#/,d[Math.floor(Math.random() * (d.length - 1))]);
  72. output = output.replace(/#e#/,e[Math.floor(Math.random() * (e.length - 1))]);
  73. output = output.replace(/#f#/,f[Math.floor(Math.random() * (f.length - 1))]);
  74. output = output.replace(/#g#/,g[Math.floor(Math.random() * (g.length - 1))]);
  75. output = output.replace(/#h#/,h[Math.floor(Math.random() * (h.length - 1))]);
  76. output = output.replace(/#i#/,i[Math.floor(Math.random() * (i.length - 1))]);
  77. output = output.replace(/#j#/,j[Math.floor(Math.random() * (j.length - 1))]);
  78. output = output.replace(/#k#/,k[Math.floor(Math.random() * (k.length - 1))]);
  79. output = output.replace(/#l#/,l[Math.floor(Math.random() * (l.length - 1))]);
  80. output = output.replace(/#m#/,m[Math.floor(Math.random() * (m.length - 1))]);
  81. output = output.replace(/#n#/,n[Math.floor(Math.random() * (n.length - 1))]);
  82. output = output.replace(/#o#/,o[Math.floor(Math.random() * (o.length - 1))]);
  83. output = output.replace(/#p#/,p[Math.floor(Math.random() * (p.length - 1))]);
  84. output = output.replace(/#q#/,q[Math.floor(Math.random() * (q.length - 1))]);
  85. output = output.replace(/#r#/,r[Math.floor(Math.random() * (r.length - 1))]);
  86. output = output.replace(/#s#/,s[Math.floor(Math.random() * (s.length - 1))]);
  87. output = output.replace(/#t#/,t[Math.floor(Math.random() * (t.length - 1))]);
  88. output = output.replace(/#u#/,u[Math.floor(Math.random() * (u.length - 1))]);
  89. output = output.replace(/#v#/,v[Math.floor(Math.random() * (v.length - 1))]);
  90. output = output.replace(/#w#/,w[Math.floor(Math.random() * (w.length - 1))]);
  91. output = output.replace(/#x#/,x[Math.floor(Math.random() * (x.length - 1))]);
  92. output = output.replace(/#y#/,y[Math.floor(Math.random() * (y.length - 1))]);
  93. output = output.replace(/#z#/,z[Math.floor(Math.random() * (z.length - 1))]);
  94. output = output.replace(/#a#/,a[Math.floor(Math.random() * (a.length - 1))]);
  95. output = output.replace(/#b#/,b[Math.floor(Math.random() * (b.length - 1))]);
  96. output = output.replace(/#c#/,c[Math.floor(Math.random() * (c.length - 1))]);
  97. output = output.replace(/#d#/,d[Math.floor(Math.random() * (d.length - 1))]);
  98. output = output.replace(/#e#/,e[Math.floor(Math.random() * (e.length - 1))]);
  99. output = output.replace(/#f#/,f[Math.floor(Math.random() * (f.length - 1))]);
  100. output = output.replace(/#g#/,g[Math.floor(Math.random() * (g.length - 1))]);
  101. output = output.replace(/#h#/,h[Math.floor(Math.random() * (h.length - 1))]);
  102. output = output.replace(/#i#/,i[Math.floor(Math.random() * (i.length - 1))]);
  103. output = output.replace(/#j#/,j[Math.floor(Math.random() * (j.length - 1))]);
  104. output = output.replace(/#k#/,k[Math.floor(Math.random() * (k.length - 1))]);
  105. output = output.replace(/#l#/,l[Math.floor(Math.random() * (l.length - 1))]);
  106. output = output.replace(/#m#/,m[Math.floor(Math.random() * (m.length - 1))]);
  107. output = output.replace(/#n#/,n[Math.floor(Math.random() * (n.length - 1))]);
  108. output = output.replace(/#o#/,o[Math.floor(Math.random() * (o.length - 1))]);
  109. output = output.replace(/#p#/,p[Math.floor(Math.random() * (p.length - 1))]);
  110. output = output.replace(/#q#/,q[Math.floor(Math.random() * (q.length - 1))]);
  111. output = output.replace(/#r#/,r[Math.floor(Math.random() * (r.length - 1))]);
  112. output = output.replace(/#s#/,s[Math.floor(Math.random() * (s.length - 1))]);
  113. output = output.replace(/#t#/,t[Math.floor(Math.random() * (t.length - 1))]);
  114. output = output.replace(/#u#/,u[Math.floor(Math.random() * (u.length - 1))]);
  115. output = output.replace(/#v#/,v[Math.floor(Math.random() * (v.length - 1))]);
  116. output = output.replace(/#w#/,w[Math.floor(Math.random() * (w.length - 1))]);
  117. output = output.replace(/#x#/,x[Math.floor(Math.random() * (x.length - 1))]);
  118. output = output.replace(/#y#/,y[Math.floor(Math.random() * (y.length - 1))]);
  119. output = output.replace(/#z#/,z[Math.floor(Math.random() * (z.length - 1))]);
  120. output = output.replace(/#a#/g,a[Math.floor(Math.random() * (a.length - 1))]);
  121. output = output.replace(/#b#/g,b[Math.floor(Math.random() * (b.length - 1))]);
  122. output = output.replace(/#c#/g,c[Math.floor(Math.random() * (c.length - 1))]);
  123. output = output.replace(/#d#/g,d[Math.floor(Math.random() * (d.length - 1))]);
  124. output = output.replace(/#e#/g,e[Math.floor(Math.random() * (e.length - 1))]);
  125. output = output.replace(/#f#/g,f[Math.floor(Math.random() * (f.length - 1))]);
  126. output = output.replace(/#g#/g,g[Math.floor(Math.random() * (g.length - 1))]);
  127. output = output.replace(/#h#/g,h[Math.floor(Math.random() * (h.length - 1))]);
  128. output = output.replace(/#i#/g,i[Math.floor(Math.random() * (i.length - 1))]);
  129. output = output.replace(/#j#/g,j[Math.floor(Math.random() * (j.length - 1))]);
  130. output = output.replace(/#k#/g,k[Math.floor(Math.random() * (k.length - 1))]);
  131. output = output.replace(/#l#/g,l[Math.floor(Math.random() * (l.length - 1))]);
  132. output = output.replace(/#m#/g,m[Math.floor(Math.random() * (m.length - 1))]);
  133. output = output.replace(/#n#/g,n[Math.floor(Math.random() * (n.length - 1))]);
  134. output = output.replace(/#o#/g,o[Math.floor(Math.random() * (o.length - 1))]);
  135. output = output.replace(/#p#/g,p[Math.floor(Math.random() * (p.length - 1))]);
  136. output = output.replace(/#q#/g,q[Math.floor(Math.random() * (q.length - 1))]);
  137. output = output.replace(/#r#/g,r[Math.floor(Math.random() * (r.length - 1))]);
  138. output = output.replace(/#s#/g,s[Math.floor(Math.random() * (s.length - 1))]);
  139. output = output.replace(/#t#/g,t[Math.floor(Math.random() * (t.length - 1))]);
  140. output = output.replace(/#u#/g,u[Math.floor(Math.random() * (u.length - 1))]);
  141. output = output.replace(/#v#/g,v[Math.floor(Math.random() * (v.length - 1))]);
  142. output = output.replace(/#w#/g,w[Math.floor(Math.random() * (w.length - 1))]);
  143. output = output.replace(/#x#/g,x[Math.floor(Math.random() * (x.length - 1))]);
  144. output = output.replace(/#y#/g,y[Math.floor(Math.random() * (y.length - 1))]);
  145. output = output.replace(/#z#/g,z[Math.floor(Math.random() * (z.length - 1))]);
  146.  
  147. upnext = "Output";
  148. if(correctInput == "false"){
  149. output = "No useable input detected. Please only use uppercase letters";
  150. }
  151. output;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement