Bot #2

none

  1. // ==UserScript==
  2. // @name Bot #2
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.3
  5. // @description none
  6. // @author COdER
  7. // @include *://multiplayerpiano.com/*
  8. // @include *://mppclone.com/*
  9. // @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
  10. // @grant none
  11. // ==/UserScript==
  12.  
  13. var admincmd = [];
  14.  
  15. MPP.client.on('participant added', pp => {
  16. MPP.chat.send('User ' + pp.name + ' (' + pp.id + ') ' + 'joined to the room!');
  17. })
  18. MPP.client.on("a", function(msg) {
  19. var asgr = msg.a.split(' ');
  20. var cmd = asgr[0];
  21. var input = msg.a.substring(cmd.length).trim();
  22.  
  23. if (cmd == '/help') {
  24. MPP.chat.send('Commands are: /help, /about, /!!!, /who, /random, /secret (ADMIN), /msg (say your msg) [your word].');
  25. }
  26. if (cmd == '/about') {
  27. MPP.chat.send('Bot made by COdER.');
  28. }
  29. if (cmd == '/!!!') {
  30. MPP.chat.send('!@#$%^&*()');
  31. }
  32. if (cmd == '/who') {
  33. MPP.chat.send('Your name is: ' + msg.p.name + ' | ID: ' + msg.p.id + ' | Color: ' + msg.p.color);
  34. }
  35. if (cmd == '/random') {
  36. var words = ['Wow!', 'Lucky!', 'Bruh.', 'YES!']; var random = Math.floor(Math.random() * words.length);
  37. MPP.chat.send('Random word: ' + words[random]);
  38. }
  39. if ((admincmd.indexOf(msg.p._id) > - 1) || (msg.p._id == MPP.client.getOwnParticipant()._id)) {
  40. if (cmd == '/secret') {
  41. MPP.chat.send('ID: 216241278645 • Login: 1g1a-222_cd');
  42. }}
  43. if (cmd == '/msg') {
  44. MPP.chat.send('Say msg: ' + msg.a.substring(5).trim());
  45. }
  46. })