Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- onMultiChat = (user, message) => {
- if (currentIP === "") return;
- if(user == 'SERVER' && message[0] == '/') {
- var split = message.slice(1, message.length).split(': ');
- var command = split[0];
- split.splice(0,1);
- var response = split.join().trim();
- if(command == 'playerid') console.log(`%c Player ID: ${response} `, 'background: #262626 ; color: #ffd700; font-size:10px; font-family: "Segoe UI"'); myid = response;
- }
- };
- updatePlayerID = () => setTimeout(() => { sendChat('/getmyid'); }, 200);
- setInterval(()=> {
- if ((typeof(myCells) !== 'undefined' ? myCells.length : 0) <= 2 && isJoinedGame === true) split(16);
- }, 7500);
- var split = (splitTimes) => {
- var data = new DataView(new ArrayBuffer(1));
- data.setUint8(0, 17);
- for (var index = 0; index < splitTimes; index++) {
- setTimeout(() => {
- webSocket.send(data.buffer);
- }, index * 50);
- }
- };
- unsafeWindow.crown = function(a) {
- var delay;
- typeof(a) !== 'undefined' ? delay = 500 : delay = 0;
- setTimeout(() => {
- var waitForFb = setInterval(() => {
- if (typeof(myid) === "undefined" ? false : myid !== ""){
- playerDetails[myid].hat = "crown";
- $('#skinurl').val("https://cdn.discordapp.com/emojis/413082647955505173.png");
- playerDetails[myid].skinUrl = "https://cdn.discordapp.com/emojis/413082647955505173.png";
- console.log(`%c Crown loaded for ${playerDetails[myid].name === "" ? 'Unnamed' : playerDetails[myid].name}👑 `, 'background: #262626 ; color: #ffd700; font-size:16px; font-family: "Segoe UI"');
- clearInterval(waitForFb);
- }
- }, 50);
- }, delay);
- };
- $("#maincard").on("click", "button", function (e) {
- if (currentIP === "") return;
- if($(this).text() === 'Play' ){
- updatePlayerID();
- console.log('%c Loading crown... ', 'background: #262626 ; color: #ffd700; font-size:14px; font-family: "Segoe UI"');
- crown();
- }
- });
- $("body").on("keydown",function(e){
- if (currentIP === "") return;
- if (e.keyCode === Object.entries(JSON.parse(getLocalStorage('hotkeyMapping'))).find(i => i[1] === "hk_start_new_game")[0].charCodeAt(0) && !$('#input_box2').is(':focus')) {
- updatePlayerID();
- console.log('%c Loading crown... ', 'background: #262626 ; color: #ffd700; font-size:14px; font-family: "Segoe UI"');
- crown(true);
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement