dimden

OWOP PACKAGE MANAGER - OPM

Nov 2nd, 2018
534
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.44 KB | None | 0 0
  1. var getJSON=function(b,f){var a=new XMLHttpRequest;a.open("GET",b,!0);a.responseType="json";a.onload=function(){var b=a.status;200===b?f(null,a.response):f(b,a.response)};a.send()};
  2. OWOP.chat.sendModifier=function(b){if(b.startsWith("/opm install-script"))return getJSON("https://api.myjson.com/bins/erkom",function(a,d){null!==a?alert("Something went wrong: "+a):"undefined"!=typeof d.scripts[""+b.slice(20)]?(OWOP.chat.clear(),OWOP.chat.local("Installing new script..."),setTimeout(function(){OWOP.chat.clear();OWOP.chat.local("INSTALLING [. ]")},200),setTimeout(function(){OWOP.chat.clear();OWOP.chat.local("INSTALLING [.. ]")},300),setTimeout(function(){OWOP.chat.clear();
  3. OWOP.chat.local("INSTALLING [.... ]")},400),setTimeout(function(){OWOP.chat.clear();OWOP.chat.local("INSTALLING [..... ]")},500),setTimeout(function(){OWOP.chat.clear();OWOP.chat.local("INSTALLING [......... ]")},800),setTimeout(function(){getJSON("https://api.myjson.com/bins/erkom",function(a,d){if(null!==a)alert("Something went wrong: "+a);else{var c=b.slice(20),g=d.scripts[""+c].source,e=document.createElement("script");e.setAttribute("id","opm_script");e.src=""+g;document.getElementsByTagName("head")[0].appendChild(e);
  4. OWOP.chat.clear();OWOP.chat.local("INSTALLING [...........]");e.onload=function(){document.getElementById("opm_script").remove();OWOP.chat.clear();OWOP.chat.local("(M) "+c+"-"+d.scripts[""+c].version+" by "+d.scripts[""+c].author+" successfully installed!")}}})},800)):OWOP.chat.local("ERROR! Script is not found!")}),b;if(b.startsWith("/opm install-style"))return getJSON("https://api.myjson.com/bins/erkom",function(a,d){null!==a?alert("Something went wrong: "+a):"undefined"!=typeof d.styles[""+b.slice(19)]?
  5. (OWOP.chat.clear(),OWOP.chat.local("Installing new style..."),setTimeout(function(){OWOP.chat.clear();OWOP.chat.local("INSTALLING [. ]")},200),setTimeout(function(){OWOP.chat.clear();OWOP.chat.local("INSTALLING [.. ]")},300),setTimeout(function(){OWOP.chat.clear();OWOP.chat.local("INSTALLING [.... ]")},400),setTimeout(function(){OWOP.chat.clear();OWOP.chat.local("INSTALLING [..... ]")},500),setTimeout(function(){OWOP.chat.clear();OWOP.chat.local("INSTALLING [......... ]")},
  6. 800),setTimeout(function(){getJSON("https://api.myjson.com/bins/erkom",function(a,d){if(null!==a)alert("Something went wrong: "+a);else{var c=b.slice(19),g=d.styles[""+c].source,e=document.createElement("script");e.setAttribute("id","opm_script");e.src=""+g;document.getElementsByTagName("head")[0].appendChild(e);OWOP.chat.clear();OWOP.chat.local("INSTALLING [...........]");e.onload=function(){document.getElementById("opm_script").remove();OWOP.chat.clear();OWOP.chat.local("(M) "+c+"-"+d.styles[""+
  7. c].version+" by "+d.styles[""+c].author+" successfully installed!")}}})},800)):OWOP.chat.local("ERROR! Style is not found!")}),b;if("/opm list-scripts"==b)return console.log("A"),getJSON("https://api.myjson.com/bins/erkom",function(a,b){if(null!==a)alert("Something went wrong: "+a);else{console.log("B");for(var c in b.list.scripts)OWOP.chat.local(b.list.scripts[c].name.toUpperCase()+": "+b.list.scripts[c].description+' To install use "/opm install-script '+b.list.scripts[c].name+'".\n ')}}),b;if("/opm list-styles"==
  8. b)return getJSON("https://api.myjson.com/bins/erkom",function(b,a){if(null!==b)alert("Something went wrong: "+b);else for(var c in a.list.styles)OWOP.chat.local(a.list.styles[c].name.toUpperCase()+": "+a.list.styles[c].description+' To install use "/opm install-style '+a.list.styles[c].name+'".\n ')}),b;if(b.startsWith("/opm install-custom")){var f=b.slice(20);if(f.includes("https://")){var a=document.createElement("script");a.setAttribute("id","opm_script");a.src=""+f;document.getElementsByTagName("head")[0].appendChild(a);
  9. a.onload=function(){document.getElementById("opm_script").remove();OWOP.chat.clear();OWOP.chat.local("(M) "+f+" successfully installed!")}}else OWOP.chat.local("Bad link or your link doesn't support HTTPS.");return b}if("/opm help"==b||"/opm"==b)OWOP.chat.local("O P M - OWOP PACKAGE MANAGER\n\n/opm list-scripts - get all scripts.\n/opm list-styles - get all styles.\n/opm install-script [SCRIPT NAME]. - install script.\n/opm install-style [STYLE NAME] - install style.\n/opm install-custom [LINK TO SCRIPT] - install script through link. (ONLY HTTPS)\n\nVISIT OUR DISCORD TO SUGGEST YOUR SCRIPT/STYLE TO DATABASE!\ndiscord.gg/k4u7ddk");
  10. else return b};OWOP.chat.clear();OWOP.chat.local("OPM successfully installed.");
Advertisement
Add Comment
Please, Sign In to add comment