Source Bot

MINI Bot to MPP

  1. // ==UserScript==
  2. // @name Source Bot
  3. // @namespace https://greasyfork.org/
  4. // @version 0.1
  5. // @description MINI Bot to MPP
  6. // @author COdER#3389
  7. // @icon https://mpphust.ga/assets/icon%20(48).png
  8. // @include *://multiplayerpiano.com/*
  9. // @include *://mppclone.com/*
  10. // @include *://mpp.terrium.net/*
  11. // @include *://piano.ourworldofpixels.com/*
  12. // @license MIT
  13. // ==/UserScript==
  14.  
  15. // Variables.
  16. var words = ['', '', '']; var random = Math.floor(Math.random() * words.length); // Random words about say on command - "/buy".
  17. var error = "Error"; // Error bot command.
  18. var adminarray = []; // Function ADMIN command.
  19.  
  20. // Bot client.
  21. MPP.client.on("a", function(msg) {
  22. var asgr = msg.a.split(' ');
  23. var cmd = asgr[0];
  24. var input = msg.a.substring(cmd.legth).trim();
  25.  
  26. // Commands.
  27. if (cmd == "!connect") {
  28. MPP.chat.send("Bot connect✅! Here is a list of commands: !help (command), !about, !version, !codelangauges, !rank, !who.")
  29. MPP.chat.send("Admin Commands: !check, !mod !name, !cn, !name1, !name2 .")
  30. MPP.chat.send("Fun Commands: !balance, !abc, !123, !bruh, !JS.")
  31. }
  32. if (cmd == "!h") {
  33. MPP.chat.send("Info: !help (command), !about, !version, !codelangauges, !rank, !who.")
  34. MPP.chat.send("Admin Commands: !check, !mod !name.")
  35. MPP.chat.send("Fun Commands: !balance, !abc, !123, !hug, !, !, !.")
  36. }
  37. if ((adminarray.indexOf(msg.p._id) > - 1) || (msg.p._id == MPP.client.getOwnParticipant()._id)) { // Admin commmand.
  38. if (cmd == "!mod") {
  39. MPP.chat.send("Your Rank Is Moderator.")
  40. }
  41. if (cmd == "!check") {
  42. MPP.chat.send("DataBase checked room name: " + MPP.client.desiredChannelId + " and _id's on room: " + MPP.client.ppl)
  43. }
  44. }
  45. if (cmd == "!about") {
  46. MPP.chat.send("This bot was created by me.")
  47. }
  48. if (cmd == "!JS") {
  49. MPP.chat.send("You arn't allowed to use this commnad.")
  50. }
  51. if (cmd == "!rank") {
  52. MPP.chat.send("Rank: Player (0)")
  53. }
  54. if (cmd == "!rankㅤㅤ") {
  55. MPP.chat.send("Rank: Administrator (4)")
  56. }
  57. if (cmd == "!JSㅤ") {
  58. MPP.chat.send("You arn't allowed to use this command")
  59. }
  60. if (cmd == "!rankㅤ") {
  61. MPP.chat.send("Rank: Owner (5)")
  62. }
  63. if (cmd == "!") {
  64. MPP.chat.send("")
  65. }
  66. if (cmd == "!") {
  67. MPP.chat.send("")
  68. }
  69. if (cmd == "!abc") {
  70. MPP.chat.send("Do you really need the know the abc's at this point? What a baby.")
  71. }
  72. if (cmd == "!") {
  73. MPP.chat.send("")
  74. }
  75. if (cmd == "!rankㅤㅤㅤ") {
  76. MPP.chat.send("You rank is Moderator")
  77. }
  78. if (cmd == "!") {
  79. MPP.chat.send("")
  80. }
  81. if (cmd == "!") {
  82. MPP.chat.send("" + msg.p.name + " .")
  83. }
  84. if (cmd == "!lol") {
  85. MPP.chat.send("If you used this command I bet someone is laughing right now.")
  86. }
  87. if (cmd == "!123") {
  88. MPP.chat.send("Why in the world are you using this command don't know how to count?")
  89. }
  90. if (cmd == "!balance") {
  91. MPP.chat.send("Your balance is ( Get a life and earn some cash you poor person. ) ")
  92. }
  93. if (cmd == "!") {
  94. MPP.chat.send("")
  95. }
  96. if (cmd == "!rank") {
  97. MPP.chat.send("")
  98. }
  99. // Admin commands.
  100. if ((adminarray.indexOf(msg.p._id) > - 1) || (msg.p._id == MPP.client.getOwnParticipant()._id)) { // Admin command.
  101. if (cmd == "cmd_name") {
  102. MPP.chat.send("Name commands: /changename, /changecolor, /name1, /name2.")
  103. }
  104. }
  105. if ((adminarray.indexOf(msg.p._id) > - 1) || (msg.p._id == MPP.client.getOwnParticipant()._id)) { // Admin command.
  106. if (cmd == "cmd_ban") {
  107. MPP.client.sendArray([{m: 'kickban', _id: msg.a.substring(5).trim(), ms: 600000}])
  108. MPP.chat.send("Banned.")
  109. }
  110. }
  111. if ((adminarray.indexOf(msg.p._id) > - 1) || (msg.p._id == MPP.client.getOwnParticipant()._id)) { // Admin command.
  112. if (cmd == "cmd_unban") {
  113. MPP.client.sendArray([{m: 'unban', _id: msg.a.substring(7).trim()}])
  114. MPP.chat.send("Unbanned.")
  115. }
  116. }
  117. if ((adminarray.indexOf(msg.p._id) > - 1) || (msg.p._id == MPP.client.getOwnParticipant()._id)) { // Admin command.
  118. if (cmd == "cmd_ub") {
  119. MPP.client.sendArray([{m: 'unban', _id: msg.a.substring(3).trim()}])
  120. MPP.chat.send("Unbanned.")
  121. }
  122. }
  123. if ((adminarray.indexOf(msg.p._id) > - 1) || (msg.p._id == MPP.client.getOwnParticipant()._id)) { // Admin command.
  124. if (cmd == "cmd_rc") {
  125. var color12 = "#000000"; // This _id color.
  126. MPP.client.sendArray([{m: "chset", set: {
  127. color: color12,
  128. color2: color12
  129. }
  130. }])
  131. MPP.chat.send("Seted room color: #000000 (inner) • #000000 (outer).")
  132. }
  133. if (cmd == "!bruh") {
  134. MPP.chat.send("bruh");
  135. }
  136. if (cmd == "!name") {
  137. MPP.client.sendArray([{m: "userset", set: {
  138. name: msg.a.substring(12).trim()
  139. }
  140. }])
  141. MPP.chat.send("!cn (Change name ), !name1, !name2 " + msg.a.substring(12).trim())
  142. }
  143. }
  144. if ((adminarray.indexOf(msg.p._id) > - 1) || (msg.p._id == MPP.client.getOwnParticipant()._id)) { // Admin command.
  145. if (cmd == "!cn") {
  146. MPP.client.sendArray([{m: "userset", set: {
  147. name: msg.a.substring(3).trim()
  148. }
  149. }])
  150. MPP.chat.send("Your name changed to: " + msg.a.substring(3).trim())
  151. }
  152. }
  153. if ((adminarray.indexOf(msg.p._id) > - 1) || (msg.p._id == MPP.client.getOwnParticipant()._id)) { // Admin command.
  154. if (cmd == "!changecolor") {
  155. MPP.client.sendArray([{m: "userset", set: {
  156. color: msg.a.substring(13).trim()
  157. }
  158. }])
  159. MPP.chat.send("You color_name changed to: " + msg.a.substring(13).trim())
  160. }
  161. }
  162. if ((adminarray.indexOf(msg.p._id) > - 1) || (msg.p._id == MPP.client.getOwnParticipant()._id)) { // Admin command.
  163. if (cmd == "cmd_cc") {
  164. MPP.client.sendArray([{m: "userset", set: {
  165. color: msg.a.substring(3).trim()
  166. }
  167. }])
  168. MPP.chat.send("You color_name changed to: " + msg.a.substring(3).trim())
  169. }
  170. if (cmd == "!name1") {
  171. MPP.client.sendArray([{m: "userset", set: {
  172. name: " ArticFox@JS [ *AM* ]",
  173. color: "#C2E0F9"
  174. }
  175. }])
  176. }
  177. if (cmd == "!name2") {
  178. MPP.client.sendArray([{m: "userset", set: {
  179. name: "~§ķýłēx~",
  180. color: "#0a73c7"
  181. }
  182. }])
  183. }
  184. }
  185. // Buy... commands.
  186. if (cmd == "!") {
  187. MPP.chat.send(msg.p.name + " you gave a hug to: " + msg.a.substring(5).trim() + ". " + words[random])
  188. }
  189. if (cmd == "!") {
  190. MPP.chat.send(msg.p.name + " kissed: " + msg.a.substring(5).trim() + ".")
  191. }
  192. if (cmd == "!.") {
  193. MPP.chat.send(msg.p.name + " you killed: " + msg.a.substring(5).trim() + "].")
  194. }
  195. if (cmd == "!.") {
  196. MPP.chat.send(msg.p.name + " fucked the shit out of " + msg.a.substring(5).trim() + "they died")
  197. }
  198. }) /* msg.a response END */;
  199.  
  200. /*
  201. MPP.client.on('participant added', pp => {
  202. MPP.chat.send("Welcome " + pp.name + " to the " + MPP.client.desiredChannelId + "! Type '/info' to info this bot.")
  203. }) /* added response end /*;
  204. */
  205.  
  206. console.log("Bot Source: Online!");