// ==UserScript== // @name ḵScripts ✔, gScripts Mod - 8.0 // @namespace http://tampermonkey.net/ // @version 8.1 // @description // @icon https://yt3.ggpht.com/a/AATXAJxIlaziTG5BfRLstKz_1uT8rDadfy_QzQ7LWg=s900-c-k-c0xffffffff-no-rj-mo // @author ḵScripts ✔, gScripts // @match https://zombs.io/ // @match localhost // @require https://greasyfork.org/scripts/47911-font-awesome-all-js/code/Font-awesome%20AllJs.js?version=275337 // @description Modded // @downloadURL none // ==/UserScript== //tab name and server id var srvr = -1; for (let i in game.options.servers) { srvr += 1; document.getElementsByClassName("hud-intro-server")[0][srvr].innerHTML += ", Server ID: " + game.options.servers[i].id; } if (localStorage.timesEhacked == undefined) { localStorage.timesEhacked = 1; } else { localStorage.timesEhacked++; } document.title = "ḵScripts ✔: " + localStorage.timesEhacked // Mod ismi document.getElementsByClassName("hud-intro-wrapper")[0].childNodes[1].innerHTML = "ḵScripts ✔." document.querySelector("#hud-intro > div.hud-intro-wrapper > h1").style.color = "#ffffff" // Yapımcı Etiketi var IntroCornertopleft = ''; IntroCornertopleft += ""; document.getElementsByClassName('hud-intro-footer')[0].innerHTML = IntroCornertopleft; // Reklamlardan & boş yazılardan arınma document.querySelectorAll('.ad-unit, .hud-intro-wrapper > h2, .hud-intro-stone, .hud-intro-corner-bottom-left, .hud-intro-canvas, .hud-intro-tree, .hud-intro-error, .hud-intro-form > label > span, .hud-intro-footer > a, .hud-intro-more-games, .hud-intro-social, .hud-intro-guide, .hud-intro-left, .hud-intro-youtuber, .hud-respawn-corner-bottom-left, .hud-respawn-twitter-btn, .hud-respawn-facebook-btn').forEach(el => el.remove()); document.getElementsByClassName('hud-party-tag')[0].setAttribute('maxlength', 49); document.getElementsByClassName('hud-intro-name')[0].setAttribute('maxlength', 29); // Pet ve hat için reklamları önleme game.network.addEnterWorldHandler(() => { game.ui.components.MenuShop.onTwitterFollow(); game.ui.components.MenuShop.onTwitterShare(); game.ui.components.MenuShop.onFacebookLike(); game.ui.components.MenuShop.onFacebookShare(); game.ui.components.MenuShop.onYouTubeSubscribe(); }); // Menü renk ayarı "let renk = 'rgb(91 300 157 / 95%)';" let renk = 'rgb(02 18 00 / 55%)'; // Siyah olması için 0'a çekildi. // Envanter ek hatlar #Beta let addWoody = document.createElement("a"); addWoody.classList.add("hud-toolbar-item"); addWoody.setAttribute("data-item", "PetMiner"); addWoody.setAttribute("data-tier", "8"); document.getElementsByClassName("hud-toolbar-inventory")[0].appendChild(addWoody); let addCARL = document.createElement("a"); addCARL.classList.add("hud-toolbar-item"); addCARL.setAttribute("data-item", "PetCARL"); addCARL.setAttribute("data-tier", "8"); document.getElementsByClassName("hud-toolbar-inventory")[0].appendChild(addCARL); let addZombieShield = document.createElement("a"); addZombieShield.classList.add("hud-toolbar-item"); addZombieShield.setAttribute("data-item", "ZombieShield"); addZombieShield.setAttribute("data-tier", "8"); document.getElementsByClassName("hud-toolbar-inventory")[0].appendChild(addZombieShield); // Ayarlar Menü let Settings = '' Settings += ` `; document.getElementsByClassName('hud-settings-grid')[0].innerHTML = Settings // Sunucu ID if (localStorage.timesEhacked == undefined) { localStorage.timesEhacked = 1; } else { localStorage.timesEhacked++; } document.title = "ḵScripts ✔: " + localStorage.timesEhacked // Spam (giriş ekranı) let shouldplayspam = {}; var playSpam = document.createElement('button'); playSpam.className = "btn btn-purple playspam"; playSpam.innerHTML = `
' + JSON.stringify(result.value) + '
',
confirmButtonText: 'Beautiful',
onClose: () => {
function countInArray(array, what) {
var count = 0;
for(var i = 0; i < array.length; i++) {
if(array[i] === what) {
count++;
}
}
return count;
}
var i;
for(i = 0; i < result.value.length; i++) {
if(result.value[i] == "") {
var parties = countInArray(result.value, "");
if(parties == 0) {
result.value.length = 3;
} else if(parties == 1) {
result.value.length = 2;
} else if(parties == 2) {
result.value.length = 1;
} else if(parties == 3) {
result.value.length = 0;
result.value == undefined;
swal("The!", "Party Name Could Not Be Entered!", "error")
}
}
}
document.getElementsByClassName('hud-menu-icon')[1].click();
var partyTag = document.getElementsByClassName('hud-party-tag')[0];
var space = new Event("keyup");
var delay;
id = setInterval(function() {
partyTag.value = result.value[Math.floor(Math.random() * result.value.length)];
space.keyCode = 32;
partyTag.dispatchEvent(space);
}, delay);
speed.addEventListener("input", function() {
clearInterval(id);
delay = speed.value;
id = setInterval(function() {
partyTag.value = result.value[Math.floor(Math.random() * result.value.length)];
space.keyCode = 32;
partyTag.dispatchEvent(space);
}, delay)
});
var stop = document.getElementsByClassName('button1')[1];
stop.onclick = function() {
result.value = null;
clearInterval(id);
id = null;
var i;
for(i = 0; i < 10000; i++) {
clearInterval(i);
}
}
}
})
}
})
}
}
}, 1000)
}
}, 250)
})();
// ^ paylaşım anahtarları özelliği orijinal olarak 444x3'ten
document.getElementsByClassName('hud-party-tabs-link')[0].onclick = () => { getId("privateHud").style.display = "none"; getId("privateTab").classList.remove("is-active"); };
document.getElementsByClassName('hud-party-tabs-link')[1].onclick = () => { getId("privateHud").style.display = "none"; getId("privateTab").classList.remove("is-active"); };
// Parti malzemeleri
game.ui.components.PlacementOverlay.oldStartPlacing = game.ui.components.PlacementOverlay.startPlacing;
game.ui.components.PlacementOverlay.startPlacing = function(e) {
game.ui.components.PlacementOverlay.oldStartPlacing(e);
if (game.ui.components.PlacementOverlay.placeholderEntity) {
game.ui.components.PlacementOverlay.direction = 2;
game.ui.components.PlacementOverlay.placeholderEntity.setRotation(180);
}
}
game.ui.components.PlacementOverlay.cycleDirection = function() {
if (game.ui.components.PlacementOverlay.placeholderEntity) {
game.ui.components.PlacementOverlay.direction = (game.ui.components.PlacementOverlay.direction + 1) % 4;
game.ui.components.PlacementOverlay.placeholderEntity.setRotation(game.ui.components.PlacementOverlay.direction * 90);
}
};
getElement("hud-party-members")[0].style.display = "block";
getElement("hud-party-grid")[0].style.display = "none";
let privateTab = document.createElement("a");
privateTab.className = "hud-party-tabs-link";
privateTab.id = "privateTab";
privateTab.innerHTML = "Partie tools";
let privateHud = document.createElement("div");
privateHud.className = "hud-private hud-party-grid";
privateHud.id = "privateHud";
privateHud.style = "display: none;";
getElement("hud-party-tabs")[0].appendChild(privateTab);
getElement("hud-menu hud-menu-party")[0].insertBefore(privateHud, getElement("hud-party-actions")[0]);
getId("privateTab").onclick = e => {
getId("privateHud2").style.display = "none";
for (let i = 0; i < getElement("hud-party-tabs-link").length; i++) {
getElement("hud-party-tabs-link")[i].className = "hud-party-tabs-link";
}
getId("privateTab").className = "hud-party-tabs-link is-active";
getId("privateHud").setAttribute("style", "display: block;");
if (getElement("hud-party-members")[0].getAttribute("style") == "display: block;") {
getElement("hud-party-members")[0].setAttribute("style", "display: none;");
}
if (getElement("hud-party-grid")[0].getAttribute("style") == "display: block;") {
getElement("hud-party-grid")[0].setAttribute("style", "display: none;");
}
if (getId("privateHud").getAttribute("style") == "display: none;") {
getId("privateHud").setAttribute("style", "display: block;");
}
}
getElement("hud-party-tabs-link")[0].onmouseup = e => {
getId("privateHud").setAttribute("style", "display: none;");
if (getId("privateTab").className == "hud-party-tabs-link is-active") {
getId("privateTab").className = "hud-party-tabs-link"
}
}
getElement("hud-party-tabs-link")[1].onmouseup = e => {
getId("privateHud").setAttribute("style", "display: none;");
if (getId("privateTab").className == "hud-party-tabs-link is-active") {
getId("privateTab").className = "hud-party-tabs-link"
}
}
getId("privateHud").innerHTML = `
${psk} [Link]
100.0%
` })(); // Serplent? // Boss Sağlık Çubuğu window.bossHealthBarContainer = document.createElement("div"); bossHealthBarContainer.className = "bossHealthBarContainer"; document.getElementsByClassName("hud")[0].append(bossHealthBarContainer); bossHealthBarContainer.setAttribute("style", ` width: auto; height: auto; background-color: rgba(0,0,0,0.4); border-radius: 4px; position: absolute; left: 50%; top: 5%; transform: translate(-50%,-50%); padding: 4px; transition: all 0.3s; z-index: 9; `) window.bossHealthBar = document.createElement("div"); bossHealthBar.className = "bossHealthBar"; bossHealthBarContainer.append(bossHealthBar); bossHealthBar.setAttribute("style", ` width: 400px; height: 0px; position: relative; top: 0%; left: 0%; background-color: rgba(0,0,0,0.4); border-radius: 2px; transition: all 0.3s; `); bossHealthBar.innerHTML = `100.0%
5000000/5000000
SEVİYE 13
`; window.bossImage = bossHealthBar.getElementsByClassName("bossImage")[0]; window.bossImageCircle = bossHealthBar.getElementsByClassName("bossimagecircle")[0]; window.numberOfBosses = bossHealthBar.getElementsByClassName("numberOfBosses")[0]; window.displayAllBossHealthBars = function (time) { setTimeout(() => { let bars = document.getElementsByClassName("bossHealthBar"); for (var i = 0; i < bars.length; i++) { bars[i].style.height = "24px"; } }, time) }; // Serplent? displayAllBossHealthBars(500); let spinTime = 5; window.bossesInfo = []; function checkIncludes(array, valueTo, property) { let checkArray = []; let timesMatched = 0; array.forEach(info => { if (info[property] == valueTo) { checkArray.push([info[property], "yes"]); } else { checkArray.push([info[property], "no"]); } }) checkArray.forEach(check => { if (check[1] == "yes") { timesMatched++; } }); return timesMatched == 0 && timesMatched > -1 ? false : true } window.zombiesActive = () => { let getZombies = false; for (let i in game.world.entities) { if (!game.world.entities[i].fromTick.model.includes("Neutral")) { if (game.world.entities[i].fromTick.model.toUpperCase().includes("BOSS")) { getZombies = true; } } } return getZombies; }; // Serplent? window.partyMembers = 99999999999999; var getBoss = setInterval(() => { var numberp = document.getElementsByClassName("bossHealthInNumbers")[0]; var percentp = document.getElementsByClassName("bossHealthInPercent")[0]; Object.entries(game.world.entities).forEach(entity => { var selected = entity[1]; if (selected.targetTick.model.toUpperCase().includes("BOSS")) { bossesInfo.length < 1 ? bossesInfo.push({ health: selected.targetTick.health, maxHealth: selected.targetTick.maxHealth, uid: selected.targetTick.uid }) : undefined; for (let i = 0; i < bossesInfo.length; i++) { if (game.world.entities[bossesInfo[i].uid] !== undefined) { bossesInfo[i].health = game.world.entities[bossesInfo[i].uid].targetTick.health; } else { bossesInfo[i].health = 0; } } if (checkIncludes(bossesInfo, selected.targetTick.uid, "uid") == false) { bossesInfo.push({ health: selected.targetTick.health, maxHealth: selected.targetTick.maxHealth, uid: selected.targetTick.uid }); } if (bossesInfo.length > 0) { window.calculatedAllBossHealth = bossesInfo.reduce((a, b) => { return a + b["health"] }, 0); window.calculatedAllBossMaxHealth = bossesInfo.reduce((a, b) => { return a + b["maxHealth"] }, 0); numberp.innerText = calculatedAllBossHealth.toFixed(0) + "/" + calculatedAllBossMaxHealth.toFixed(0); percentp.innerText = (100 - (calculatedAllBossMaxHealth - calculatedAllBossHealth) / calculatedAllBossMaxHealth * 100).toFixed(1) + "%"; bossesInfo.length > 4 ? numberOfBosses.innerText = 4 : numberOfBosses.innerText = bossesInfo.length; bossHealthBar.getElementsByClassName("bossHealthBarInner")[0].style.width = (100 - (calculatedAllBossMaxHealth - calculatedAllBossHealth) / calculatedAllBossMaxHealth * 100).toFixed(1) + "%"; window.tierArray = [] Object.entries(game.world.entities).forEach(zombie => { if (zombie[1].targetTick.model.toUpperCase().includes("ZOMBIE")) { tierArray.push(zombie[1].targetTick.model.match(/[0-9]+/g).join("")) } }) window.repeated = []; window.object = {}; for (let i of tierArray) { if (object[i] !== undefined) { object[i]++ } else { object[i] = 1; } }; Object.keys(object).map(function (property) { let repeatition = { repeated: object[property] }; repeated.push([property, repeatition]) }); var max = []; for (let i in repeated) { max.push(repeated[i][1].repeated); if (repeated[i][1].repeated == Math.max(...max)) { bossHealthBar.getElementsByClassName("bossTier")[0].innerText = "SEVİYE" + " " + repeated[i][0] } } } else { numberp.innerText = 0; percentp.innerText = 0; } // console.log(selected.targetTick.model, "Health: " + selected.targetTick.health, "Max-Health: " + selected.targetTick.maxHealth); } } ) let spinSpeed = spinTime; if (window.calculatedAllBossHealth) { var speedToSet = (((100 - (calculatedAllBossMaxHealth - calculatedAllBossHealth) / calculatedAllBossMaxHealth * 100).toFixed(1) / 100) * spinTime).toFixed(1); if (speedToSet > 0.1) { spinSpeed = speedToSet; } else { spinSpeed = 0.1 } } else { spinSpeed = spinTime; } bossImageCircle.style.animation = "spinBorder " + spinSpeed + "s linear infinite"; bossImage.style.animation = "spinOpposite " + spinSpeed + "s linear infinite"; }, 100) var displayHealthBar = setInterval(() => { if (zombiesActive() == false) { bossHealthBarContainer.style.opacity = "0"; } else { bossHealthBarContainer.style.opacity = "1"; } }, 25); // Kurt? var inGame = false; setInterval(() => { if (game.world.inWorld == true && inGame == false) { var timeLeft = 60; window.oldTime = game.ui.components.DayNightTicker.tickData.isDay var tellDay = setInterval(() => { setTimeout(() => { window.oldTime = game.ui.components.DayNightTicker.tickData.isDay; }, 50) window.time = game.ui.components.DayNightTicker.tickData.isDay; if (oldTime !== time) { // console.log(time == 0 ? "Night" : "Day"); timeLeft = 60 } }, 50) var decreamentInTimeLeft = setInterval(() => { if (timeLeft > 0.0) { timeLeft -= 0.1 }; if (time == 1 && timeLeft.toFixed(1) == 30) { window.bossesInfo = []; // console.log("Resetting: bossesInfo...") } // console.log(timeLeft.toFixed(1) + "s"); }, 100); inGame = true; } }, 100) // Sohbet silici document.querySelector('#clearchatbtn').addEventListener('click', clearChat) function clearChat() { document.querySelector('.hud-chat-messages').innerHTML = "" console.clear() } // Otomatik pet yükseltme !function(){const e=e=>new Promise((t,c)=>{try{setTimeout(t,e)}catch(e){c(e)}});let t=document.createElement("script");t.src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js",document.body.appendChild(t),e(1e3).then(()=>{let t=document.createElement("script");t.src="https://cdn.jsdelivr.net/gh/uzairfarooq/arrive/minified/arrive.min.js",document.body.appendChild(t),e(1e3).then(()=>{$(document).arrive(".hud-shop-actions-revive",function(e){$(this)[0].click()}),$(document).arrive(".hud-shop-actions-evolve",function(e){$(this)[0].click()})})})}(); // Komutlar menüsü (function() { let styles1 = document.createTextNode(` .hud-menu-scripts { display: none; position: fixed; top: 54.5%; left: 50.5%; width: 700px; height: 500px; margin: -350px 0 0 -350px; padding: 20px; background-color: ${renk}; color: #eee; border-radius: 4px; background: url('https://i.pinimg.com/564x/83/17/a2/8317a2fb2d0cd7d33abb016faf357b75.jpg'); z-index: 15; overflow-y: auto; opacity: 0.65; background-size: cover; } .hud-menu-icons .hud-menu-icon[data-type=Scripts]::before { background-image: url('https://i.imgur.com/Igqp5Pc.png'); background-size: 30px `); let css = document.createElement("style"); css.type = "text/css"; css.appendChild(styles1); document.body.appendChild(css); let menu_html = "'Ç' Open menu
" scr += "'-' Show player information
" scr += "'.' 3x3 wall
" scr += "',' 3x3 door
" scr += "'+' 5x5 wall
" scr += "'*' 5x5 door
" scr += "'/' 7x7 wall
" scr += "'&' 9x9 wall
" scr += "'%' 14x14 wall
" scr += "'!' 20x20 wall
" scr += "!boss - Indicates boss waves
" scr += "!ahrc - Enables ahrc
" scr += "!space - Auto Strike (Bow)
" scr += `Yapımcıyla İletişim` document.getElementsByClassName("hud-menu-scripts")[0].innerHTML = scr const minimap = document.getElementById("hud-map"); game.world.createEntity2 = game.world.createEntity; game.world.createEntity = entity => { if(["Wall", "Door", "SlowTrap", "ArrowTower", "BombTower", "MagicTower", "ResourceHarvester", "CannonTower", "MeleeTower", "GoldMine", "GoldStash"].includes(entity.model)) { const entityDiv = document.createElement("div"); entityDiv.classList.add("hud-map-building"); entityDiv.style.left = `${entity.position.x / 24000 * 100}%`; entityDiv.style.top = `${entity.position.y / 24000 * 100}%`; entityDiv.style.display = "block"; minimap.appendChild(entityDiv); }; game.world.createEntity2(entity); }; let ws; let opcode5Listeners = []; const decodeOpcode5 = (data) => { return new Promise((res, rej) => { ws.send(JSON.stringify({ type: "decodePreEnterWorld", data: data, preEnterWorldToken: ws.preEnterWorldToken })); opcode5Listeners.push((decoded) => { res(decoded); }); }); }; let scannerAlts = []; const scanServer = serverId => { return new Promise((res, rej) => { let connectionOptions = game.options.servers[serverId]; let ws = new WebSocket(`wss://${connectionOptions.hostname}:443`); scannerAlts.push(ws); ws.binaryType = 'arraybuffer'; ws.onopen = (data) => { ws.network = new game.networkType(); ws.network.sendPacket = (_event, _data) => { ws.send(ws.network.codec.encode(_event, _data)); }; ws.onmessage = msg => { if (new Uint8Array(msg.data)[0] == 5) { ws.network = new game.networkType(); ws.network.sendPacket = (e, t) => { ws.readyState === 1 && ws.send(ws.network.codec.encode(e, t)); }; decodeOpcode5(Array.from(new Uint8Array(msg.data))).then(decoded => { ws.network.sendPacket(4, { displayName: "24k Scanner", extra: new Uint8Array(decoded[5]) }); ws.EnterWorld2Response = decoded[6]; }); return; }; const data = ws.network.codec.decode(msg.data); if(data.opcode == 4) { ws.EnterWorld2Response && ws.send(new Uint8Array(ws.EnterWorld2Response)); for (let i = 0; i < 50; i++) ws.send(new Uint8Array([3, 17, 123, 34, 117, 112, 34, 58, 49, 44, 34, 100, 111, 119, 110, 34, 58, 48, 125])); ws.send(new Uint8Array([9, 6, 0, 0, 0, 126, 8, 0, 0, 108, 27, 0, 0, 146, 23, 0, 0, 82, 23, 0, 0, 8, 91, 11, 0, 8, 91, 11, 0, 0, 0, 0, 0, 32, 78, 0, 0, 76, 79, 0, 0, 172, 38, 0, 0, 120, 155, 0, 0, 166, 39, 0, 0, 140, 35, 0, 0, 36, 44, 0, 0, 213, 37, 0, 0, 100, 0, 0, 0, 120, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 134, 6, 0, 0])); }; if(data.name == "Leaderboard") { if(!ws.partyList) { return; }; const population = ws.partyList.map(i => i.memberCount).reduce((a, b) => a + b); if (data.response.length == 1 && population > 1) { return; }; res({ lb: data.response, pop: population }); ws.close(); }; if(data.name == "SetPartyList") { ws.partyList = data.response; }; } }; }); }; const replNames = ["", "a", "b", "c"]; const newScannerWS = () => { fetch(`https://24k${replNames[Math.floor(Math.random() * replNames.length)]}.zombsscripts.repl.co`).then(res => res.text()).then(url => { const previousReconnect = ws ? ws.reconnect : 0; ws = new WebSocket(`wss://${url}`); ws.addEventListener("open", () => { ws.reconnect = previousReconnect; ws.send(JSON.stringify({ type: "getData" })); ws.addEventListener("message", msg => { const data = JSON.parse(msg.data); switch(data.type) { case "scanServer": ws.preEnterWorldToken = data.preEnterWorldToken; setTimeout(() => { let scanned = false; scanServer(data.serverId).then(serverData => { ws.send(JSON.stringify({ type: "serverData", serverId: data.serverId, lb: serverData.lb, pop: serverData.pop })); ws.send(JSON.stringify({ type: "getData" })); scanned = true; }); setTimeout(() => { if(!scanned) { ws.send(JSON.stringify({ type: "serverData", serverId: game.options.serverId, lb: game.ui.components.Leaderboard.leaderboardData, pop: Object.values(game.ui.parties).map(i => i.memberCount).reduce((a, b) => a + b) })); for(const scannerWs of scannerAlts) { scannerWs.close(); }; scannerAlts = []; }; }, 28000); }, 3000); break; case "scanData": window.scanData = data.data; for(const server of Array.from(document.querySelectorAll(".hud-intro-server > optgroup > option"))) { const serverScanData = window.scanData[server.value]; server.innerHTML = ` ${game.options.servers[server.value].name}, ${serverScanData ? serverScanData.pop : 32}/32, ${serverScanData ? ` ${serverScanData.lb[0].name.replaceAll(/<(?:.|\n)*?>/gm, '')}, Wave => ${parseInt(serverScanData.lb[0].wave).toLocaleString("en")}, Score => ${parseInt(serverScanData.lb[0].score).toLocaleString("en")}` : "" }`; }; break; case "preEnterWorldData": for(let i in opcode5Listeners) { opcode5Listeners[i](data.data); delete opcode5Listeners[i]; }; break; }; }); ws.addEventListener("close", () => { if(ws.reconnect < 5) { ws.reconnect++; newScannerWS(); }; }); }); }); }; newScannerWS();