Tehc

MPP Piano Boom! v0.1

May 31st, 2019
735
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name         MPP Piano Boom!
  3. // @namespace    http://tampermonkey.net/
  4. // @version      0.1.1
  5. // @description  Make everyone's ears explode! >:D
  6. // @author       ๖ۣۜTehc
  7. // @match        http://www.multiplayerpiano.com/*
  8. // @grant        none
  9. // ==/UserScript==
  10.  
  11. window.l = 100;
  12.  
  13. (function() {
  14.     'use strict';
  15.  
  16.     setInterval(() => {
  17.     MPP.noteQuota.points = Number.MAX_SAFE_INTEGER;
  18. }, 50);
  19. let timed = () => {
  20.     MPP.chat.send(`Prepare your ears!`);
  21.         setTimeout(() => {
  22.             MPP.chat.send(`3...`);
  23.             setTimeout(() => {
  24.                 MPP.chat.send(`2...`);
  25.                 setTimeout(() => {
  26.                     MPP.chat.send(`1...`);
  27.                     setTimeout(() => {
  28.                         MPP.chat.send(`KABOOM!`);
  29.                         Object.keys(MPP.piano.keys).forEach((key, i) => {
  30.                             MPP.press(key, l);
  31.                         });
  32.                     }, 1000);
  33.                 }, 1000);
  34.             }, 1000);
  35.         }, 1000);
  36. }
  37. let untimed = () => {
  38.     Object.keys(MPP.piano.keys).forEach((key, i) => {
  39.                             MPP.press(key, l);
  40.                         });
  41. }
  42. document.onkeydown=(e)=>{e=e||window.event; switch(e.keyCode){ case 38:timed();break; case 40:untimed();break;}};
  43.  
  44. })();
Advertisement
Add Comment
Please, Sign In to add comment