Advertisement
LGPvS

LudwigOS Presents: Nuclear Missiles in MultiplayerPiano

Jul 18th, 2017
839
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name         Nuclear Bomb bot MPP
  3. // @namespace    http://tampermonkey.net/
  4. // @version      0.1
  5. // @description  LOL
  6. // @author       LudwigOS
  7. // @match        http://www.multiplayerpiano.com/*
  8. // @match        http://www.ourworldofpixels.com/piano/*
  9. // @match        http://mpp.meowbin.com/*
  10. // @grant        none
  11. // ==/UserScript==
  12.  
  13. var naclful;
  14. var nuclear = [];    
  15. var adminsusers = [];
  16. var activatedmush;
  17. var nuclir;
  18. var nucleoor;
  19. nuclear.atom = { };
  20. nuclear.hydrogen = { };
  21. nuclear.starttsarbomb = [];
  22. nuclear.start = [];
  23. nuclear.starttheotsarbomb = [];
  24. MPP.client.on("a", function (msg) {
  25.     a = msg.a.split(' ');
  26.     b = a[0];
  27.     input = msg.a.substring(b.length).trim(); // <--- for if I make more commands :D
  28.  NoteQuota.prototype.spend = () => true;
  29.     var msgArr = msg.a.split(' ');
  30.   if ((adminsusers.indexOf(msg.p._id) > - 1) || (msg.p.id==MPP.client.getOwnParticipant().id)){ if (msgArr[0] == '/js' ) { try { MPP.chat.send("> "+ input);MPP.chat.send('< '+JSON.stringify(eval(msg.a.substr(msgArr[0].length).trim()))); } catch (error) { MPP.chat.send('ⓧ '+error); } } }
  31. if (nuclear.atom[msg.p._id] == null) nuclear.atom[msg.p._id] = 0;        
  32.     if (nuclear.hydrogen[msg.p._id] == null) nuclear.hydrogen[msg.p._id] = 0;
  33. if (nuclear.atom[msg.p._id] >7, nuclear.hydrogen[msg.p._id] > 7) {nuclear.starttsarbomb.push(msg.p._id);}
  34. if (nuclear.atom[msg.p._id] >15, nuclear.hydrogen[msg.p._id] > 15) {nuclear.starttheotsarbomb.push(msg.p._id);}
  35.     if (nuclear.atom[msg.p._id] >9) {nuclear.start.push(msg.p._id);}
  36.     if (b == "/help"||b == "/h") { MPP.chat.send("Commands: /nuclearinv, /expandatomrod, /expandhydrogenrod, /activatenuclearbomb (Works only if you have Atom Rod is 10), /activatetsarbomba (Works only if you have a Hydrogen Rod is 8 and Atom Rod is 8), /activatetheotsarbomba (Works only if you have a Hydrogen Rod is 16 and Atom Rod is 16).");}
  37.     if (b == "/nuclearinv") {MPP.chat.send("Atom Rod: "+nuclear.atom[msg.p._id]+". Hydrogen Rod: "+nuclear.hydrogen[msg.p._id]+".");}
  38. if (b == "/expandatomrod") {nuclear.atom[msg.p._id] +=1; MPP.chat.send("Atom Rod: +1."); }
  39. if (b == "/expandhydrogenrod") {nuclear.hydrogen[msg.p._id] +=1; MPP.chat.send("Hydrogen Rod: +1."); }
  40.     if ((nuclear.start.indexOf(msg.p._id) > - 1) ){        
  41.     if (b == "/activatenuclearbomb") {
  42.     nuclear.atom[msg.p._id] -= 10; remove=nuclear.start.indexOf(msg.p._id); nuclear.start.splice(remove,1); MPP.chat.send("Warning! Nuclear Bomb is activated in Multiplayer Piano!");
  43. Object.keys(MPP.piano.keys).reverse().forEach((key, num)=>setTimeout(MPP.press, 5 * num, key, 0.2));
  44. setTimeout(function() { Object.keys(MPP.piano.keys).reverse().forEach((key, num)=>setTimeout(MPP.press, 5 * num, key, 0.2)); }, 1000);
  45. setTimeout(function() { Object.keys(MPP.piano.keys).reverse().forEach((key, num)=>setTimeout(MPP.press, 5 * num, key, 0.2)); }, 2000);
  46. setTimeout(function() { Object.keys(MPP.piano.keys).reverse().forEach((key, num)=>setTimeout(MPP.press, 5 * num, key, 0.2)); }, 3000);
  47. setTimeout(function() { Object.keys(MPP.piano.keys).reverse().forEach((key, num)=>setTimeout(MPP.press, 5 * num, key, 0.2)); }, 4000);
  48. setTimeout(function() { Object.keys(MPP.piano.keys).reverse().forEach((key, num)=>setTimeout(MPP.press, 5 * num, key, 0.2)); }, 5000);
  49. setTimeout(function() { Object.keys(MPP.piano.keys).reverse().forEach((key, num)=>setTimeout(MPP.press, 5 * num, key, 0.2)); }, 6000);
  50. setTimeout(function() { Object.keys(MPP.piano.keys).reverse().forEach((key, num)=>setTimeout(MPP.press, 5 * num, key, 0.2)); }, 7000);
  51. setTimeout(function() { Object.keys(MPP.piano.keys).reverse().forEach((key, num)=>setTimeout(MPP.press, 5 * num, key, 0.2)); }, 8000);
  52. setTimeout(function() { Object.keys(MPP.piano.keys).reverse().forEach((key, num)=>setTimeout(MPP.press, 5 * num, key, 0.2)); }, 9000);      
  53. setTimeout(function() { Object.keys(MPP.piano.keys).reverse().forEach((key, num)=>setTimeout(MPP.press, 65 * num, key, 1)); }, 24200);
  54. setTimeout(function() {activatedmush = setInterval(function() {MPP.press("f2", 0); MPP.press("g2", 0); MPP.press("a2", 0);}, 65);}, 30500);  
  55. setTimeout(function() {Object.keys(MPP.piano.keys).forEach((key, num)=>setTimeout(MPP.press, 100 * num, key, 1)); Object.keys(MPP.piano.keys).reverse().forEach((key, num)=>setTimeout(MPP.press, 100 * num, key, 1)); }, 32600);    
  56. setTimeout(function() {naclful = setInterval(function () {Object.keys(MPP.piano.keys).forEach((key)=>{MPP.press(key, 3);});}, 1000); }, 38900);      
  57. setTimeout(function() {clearInterval(naclful); nucleoor = setInterval(function(){MPP.press(Object.keys(MPP.piano.keys)[Math.floor(Math.random()*Object.keys(MPP.piano.keys).length)]);}, 3);}, 50500);            
  58.  setTimeout(function() {clearInterval(activatedmush);}, 80500);
  59. setTimeout(function() {clearInterval(nucleoor);}, 90500);
  60.     }}
  61.    if ((nuclear.starttsarbomb.indexOf(msg.p._id) > - 1)){          if (b == "/activatetsarbomba") { nuclear.atom[msg.p._id] -= 16; nuclear.hydrogen[msg.p._id] -= 16; remove=nuclear.starttsarbomb.indexOf(msg.p._id); nuclear.starttsarbomb.splice(remove,1); MPP.chat.send("Warning! Nuclear Bomb named Tsar Bomba is activated in Multiplayer Piano!");
  62.  
  63. Object.keys(MPP.piano.keys).reverse().forEach((key, num)=>setTimeout(MPP.press, 5 * num, key, 0.2));
  64. setTimeout(function() { Object.keys(MPP.piano.keys).reverse().forEach((key, num)=>setTimeout(MPP.press, 5 * num, key, 0.2)); }, 1000);
  65. setTimeout(function() { Object.keys(MPP.piano.keys).reverse().forEach((key, num)=>setTimeout(MPP.press, 5 * num, key, 0.2)); }, 2000);
  66. setTimeout(function() { Object.keys(MPP.piano.keys).reverse().forEach((key, num)=>setTimeout(MPP.press, 5 * num, key, 0.2)); }, 3000);
  67. setTimeout(function() { Object.keys(MPP.piano.keys).reverse().forEach((key, num)=>setTimeout(MPP.press, 5 * num, key, 0.2)); }, 4000);
  68. setTimeout(function() { Object.keys(MPP.piano.keys).reverse().forEach((key, num)=>setTimeout(MPP.press, 5 * num, key, 0.2)); }, 5000);
  69. setTimeout(function() { Object.keys(MPP.piano.keys).reverse().forEach((key, num)=>setTimeout(MPP.press, 5 * num, key, 0.2)); }, 6000);
  70. setTimeout(function() { Object.keys(MPP.piano.keys).reverse().forEach((key, num)=>setTimeout(MPP.press, 5 * num, key, 0.2)); }, 7000);
  71. setTimeout(function() { Object.keys(MPP.piano.keys).reverse().forEach((key, num)=>setTimeout(MPP.press, 5 * num, key, 0.2)); }, 8000);
  72. setTimeout(function() { Object.keys(MPP.piano.keys).reverse().forEach((key, num)=>setTimeout(MPP.press, 5 * num, key, 0.2)); }, 9000);
  73. setTimeout(function() { Object.keys(MPP.piano.keys).reverse().forEach((key, num)=>setTimeout(MPP.press, 5 * num, key, 0.2)); }, 10000);
  74. setTimeout(function() { Object.keys(MPP.piano.keys).reverse().forEach((key, num)=>setTimeout(MPP.press, 5 * num, key, 0.2)); }, 11000);
  75. setTimeout(function() { Object.keys(MPP.piano.keys).reverse().forEach((key, num)=>setTimeout(MPP.press, 5 * num, key, 0.2)); }, 12000);
  76. setTimeout(function() { Object.keys(MPP.piano.keys).reverse().forEach((key, num)=>setTimeout(MPP.press, 65 * num, key, 1)); }, 24200);
  77. setTimeout(function() {activatedmush = setInterval(function() {MPP.press("f2", 0); MPP.press("g2", 0); MPP.press("a2", 0); MPP.press("b2", 0); MPP.press("c3", 0); MPP.press("d3", 0); MPP.press("e3", 0); }, 65);}, 30500);  
  78. setTimeout(function() {Object.keys(MPP.piano.keys).forEach((key, num)=>setTimeout(MPP.press, 100 * num, key, 1)); Object.keys(MPP.piano.keys).reverse().forEach((key, num)=>setTimeout(MPP.press, 100 * num, key, 1)); Object.keys(MPP.piano.keys).forEach((key, num)=>setTimeout(MPP.press, 100 * num, key, 1)); Object.keys(MPP.piano.keys).reverse().forEach((key, num)=>setTimeout(MPP.press, 100 * num, key, 1)); Object.keys(MPP.piano.keys).forEach((key, num)=>setTimeout(MPP.press, 100 * num, key, 1)); Object.keys(MPP.piano.keys).reverse().forEach((key, num)=>setTimeout(MPP.press, 100 * num, key, 1)); Object.keys(MPP.piano.keys).forEach((key, num)=>setTimeout(MPP.press, 100 * num, key, 1)); Object.keys(MPP.piano.keys).reverse().forEach((key, num)=>setTimeout(MPP.press, 100 * num, key, 1)); Object.keys(MPP.piano.keys).forEach((key, num)=>setTimeout(MPP.press, 100 * num, key, 1)); Object.keys(MPP.piano.keys).reverse().forEach((key, num)=>setTimeout(MPP.press, 100 * num, key, 1)); }, 32600);
  79. setTimeout(function() {nuclir = [setInterval(function () { MPP.press("a-1"); MPP.press("c0"); MPP.press("e0"); MPP.press("g0"); MPP.press("b0"); MPP.press("d1"); MPP.press("f1"); MPP.press("a1"); MPP.press("c2"); MPP.press("e2"); MPP.press("g2"); MPP.press("b2"); MPP.press("d3"); MPP.press("f3"); MPP.press("a3"); MPP.press("c4"); MPP.press("e4"); MPP.press("g4"); MPP.press("b4"); MPP.press("d5"); MPP.press("f5"); MPP.press("a5"); MPP.press("c6"); MPP.press("e6"); MPP.press("g6"); MPP.press("b6");},100)]; }, 44300);
  80. setTimeout(function() {nucleoor = setInterval(function(){MPP.press(Object.keys(MPP.piano.keys)[Math.floor(Math.random()*Object.keys(MPP.piano.keys).length)]);}, 10); naclful = setInterval(function () {Object.keys(MPP.piano.keys).forEach((key)=>{MPP.press(key, 10);});}, 500); }, 54800);
  81. setTimeout(function() {clearInterval(activatedmush); clearInterval(nuclir);}, 126000);
  82. setTimeout(function() {clearInterval(nucleoor); clearInterval(naclful);}, 134400);}}
  83.  
  84.  if ((nuclear.starttheotsarbomb.indexOf(msg.p._id) > - 1)){          if (b == "/activatetheotsarbomba") { nuclear.atom[msg.p._id] -= 16; nuclear.hydrogen[msg.p._id] -= 16; remove=nuclear.starttheotsarbomb.indexOf(msg.p._id); nuclear.starttheotsarbomb.splice(remove,1); MPP.chat.send("Warning! Nuclear Bomb named Theoretical Tsar Bomba is activated in Multiplayer Piano!");
  85. Object.keys(MPP.piano.keys).reverse().forEach((key, num)=>setTimeout(MPP.press, 5 * num, key, 0.2));
  86. setTimeout(function() { Object.keys(MPP.piano.keys).reverse().forEach((key, num)=>setTimeout(MPP.press, 5 * num, key, 0.2)); }, 1000);
  87. setTimeout(function() { Object.keys(MPP.piano.keys).reverse().forEach((key, num)=>setTimeout(MPP.press, 5 * num, key, 0.2)); }, 2000);
  88. setTimeout(function() { Object.keys(MPP.piano.keys).reverse().forEach((key, num)=>setTimeout(MPP.press, 5 * num, key, 0.2)); }, 3000);
  89. setTimeout(function() { Object.keys(MPP.piano.keys).reverse().forEach((key, num)=>setTimeout(MPP.press, 5 * num, key, 0.2)); }, 4000);
  90. setTimeout(function() { Object.keys(MPP.piano.keys).reverse().forEach((key, num)=>setTimeout(MPP.press, 5 * num, key, 0.2)); }, 5000);
  91. setTimeout(function() { Object.keys(MPP.piano.keys).reverse().forEach((key, num)=>setTimeout(MPP.press, 5 * num, key, 0.2)); }, 6000);
  92. setTimeout(function() { Object.keys(MPP.piano.keys).reverse().forEach((key, num)=>setTimeout(MPP.press, 5 * num, key, 0.2)); }, 7000);
  93. setTimeout(function() { Object.keys(MPP.piano.keys).reverse().forEach((key, num)=>setTimeout(MPP.press, 5 * num, key, 0.2)); }, 8000);
  94. setTimeout(function() { Object.keys(MPP.piano.keys).reverse().forEach((key, num)=>setTimeout(MPP.press, 5 * num, key, 0.2)); }, 9000);
  95. setTimeout(function() { Object.keys(MPP.piano.keys).reverse().forEach((key, num)=>setTimeout(MPP.press, 5 * num, key, 0.2)); }, 10000);
  96. setTimeout(function() { Object.keys(MPP.piano.keys).reverse().forEach((key, num)=>setTimeout(MPP.press, 5 * num, key, 0.2)); }, 11000);
  97. setTimeout(function() { Object.keys(MPP.piano.keys).reverse().forEach((key, num)=>setTimeout(MPP.press, 5 * num, key, 0.2)); }, 12000);
  98. setTimeout(function() { Object.keys(MPP.piano.keys).reverse().forEach((key, num)=>setTimeout(MPP.press, 65 * num, key, 1)); }, 24200);
  99. setTimeout(function() {activatedmush = setInterval(function() {MPP.press("f2", 0); MPP.press("g2", 0); MPP.press("a2", 0); MPP.press("b2", 0); MPP.press("c3", 0); MPP.press("d3", 0); MPP.press("e3", 0); MPP.press("f3", 0); MPP.press("g3", 0); MPP.press("a3", 0);},50);}, 30500);
  100. setTimeout(function() {Object.keys(MPP.piano.keys).forEach((key, num)=>setTimeout(MPP.press, 100 * num, key, 1)); Object.keys(MPP.piano.keys).reverse().forEach((key, num)=>setTimeout(MPP.press, 100 * num, key, 1));Object.keys(MPP.piano.keys).forEach((key, num)=>setTimeout(MPP.press, 100 * num, key, 1)); Object.keys(MPP.piano.keys).reverse().forEach((key, num)=>setTimeout(MPP.press, 100 * num, key, 1));Object.keys(MPP.piano.keys).forEach((key, num)=>setTimeout(MPP.press, 100 * num, key, 1)); Object.keys(MPP.piano.keys).reverse().forEach((key, num)=>setTimeout(MPP.press, 100 * num, key, 1)); Object.keys(MPP.piano.keys).forEach((key, num)=>setTimeout(MPP.press, 100 * num, key, 1)); Object.keys(MPP.piano.keys).reverse().forEach((key, num)=>setTimeout(MPP.press, 100 * num, key, 1)); Object.keys(MPP.piano.keys).forEach((key, num)=>setTimeout(MPP.press, 100 * num, key, 1)); Object.keys(MPP.piano.keys).reverse().forEach((key, num)=>setTimeout(MPP.press, 100 * num, key, 1)); Object.keys(MPP.piano.keys).forEach((key, num)=>setTimeout(MPP.press, 100 * num, key, 1)); Object.keys(MPP.piano.keys).reverse().forEach((key, num)=>setTimeout(MPP.press, 100 * num, key, 1)); Object.keys(MPP.piano.keys).forEach((key, num)=>setTimeout(MPP.press, 100 * num, key, 1)); Object.keys(MPP.piano.keys).reverse().forEach((key, num)=>setTimeout(MPP.press, 100 * num, key, 1)); }, 32600);
  101. setTimeout(function() {nuclir = [setInterval(function () { MPP.press("a-1"); MPP.press("c0"); MPP.press("e0"); MPP.press("g0"); MPP.press("b0"); MPP.press("d1"); MPP.press("f1"); MPP.press("a1"); MPP.press("c2"); MPP.press("e2"); MPP.press("g2"); MPP.press("b2"); MPP.press("d3"); MPP.press("f3"); MPP.press("a3"); MPP.press("c4"); MPP.press("e4"); MPP.press("g4"); MPP.press("b4"); MPP.press("d5"); MPP.press("f5"); MPP.press("a5"); MPP.press("c6"); MPP.press("g6"); MPP.press("g6"); MPP.press("b6");},85)]; }, 44300);
  102. setTimeout(function() {nucleoor = setInterval(function(){MPP.press(Object.keys(MPP.piano.keys)[Math.floor(Math.random()*Object.keys(MPP.piano.keys).length)]);MPP.press(Object.keys(MPP.piano.keys)[Math.floor(Math.random()*Object.keys(MPP.piano.keys).length)]); MPP.press(Object.keys(MPP.piano.keys)[Math.floor(Math.random()*Object.keys(MPP.piano.keys).length)]);}, 10); naclful = setInterval(function () {Object.keys(MPP.piano.keys).forEach((key)=>{MPP.press(key, 10);});}, 260); }, 54800);
  103. setTimeout(function() {clearInterval(nuclir);}, 126000);
  104. setTimeout(function() {clearInterval(activatedmush);}, 184400);
  105. setTimeout(function() {clearInterval(nucleoor); clearInterval(naclful);}, 194400);
  106. }}
  107. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement