// ==UserScript==
// @name Fahx and coldness mod leaked
// @namespace http://tampermonkey.net/
// @version 0.3
// @description leaked ad this works
// @author fahx and coldness
// @match http://zombs.io/
// @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant none
// @license MIT
// @downloadURL https://update.greasyfork.icu/scripts/446264/Fahx%20and%20coldness%20mod%20leaked.user.js
// @updateURL https://update.greasyfork.icu/scripts/446264/Fahx%20and%20coldness%20mod%20leaked.meta.js
// ==/UserScript==
document.querySelectorAll('.ad-unit, .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-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);
let themeColor = 'rgb(61 115 157 / 55%)';
let imageArray1 = [``,
`
`]
function getRandomItem(array) {
return array[Math.floor(Math.random() * array.length)];
};
let css2 = `
.hud-intro::before {
background-image: url('https://cdn.discordapp.com/attachments/854376044522242059/924865286719557672/BG_Mirai_Light.webp');
background-size: cover;
}
.hud-intro .hud-intro-form .hud-intro-play {
width: 150px;
height: 150px;
transform: rotate(45deg);
border: 3px solid white;
margin: -150px 0 0 500px;
background-image: url(https://cdn.discordapp.com/attachments/854376044522242059/925724425796616192/hmm.webp);
background-size: 145%;
padding: 0 0 0 0;
background-position-y: center;
background-position-x: center;
transition: all 0.15s ease-in-out;
}
.hud-intro .hud-intro-form .hud-intro-play:hover {
background-image: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)), url(https://cdn.discordapp.com/attachments/854376044522242059/925724425796616192/hmm.webp);
}
.hud-intro .hud-intro-form .hud-intro-name {
line-height: none;
margin: 0 0 -80px 170px;
border: 3px solid white;
background-image: linear-gradient(rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.5)), url(https://cdn.discordapp.com/attachments/854376044522242059/925743376505118720/light2.webp);
background-position-x: 130px;
}
.hud-intro .hud-intro-form .hud-intro-server {
display: block;
line-height: unset;
margin: 130px 0 0 170px;
border: 3px solid white;
background-image: linear-gradient(rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.5)), url(https://cdn.discordapp.com/attachments/854376044522242059/925743376505118720/light2.webp);
}
.hud-intro .hud-intro-main .hud-intro-left, .hud-intro .hud-intro-main .hud-intro-form, .hud-intro .hud-intro-main .hud-intro-guide {
background: rgba(0, 0, 0, 0);
margin: 0 530px 0 0;
}
.switch {
position: relative;
display: inline-block;
width: 60px;
height: 34px;
}
.switch input {
opacity: 0;
width: 0;
height: 0;
}
.slider {
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: #ccc;
-webkit-transition: .4s;
transition: .4s;
}
.slider:before {
position: absolute;
content: "";
height: 26px;
width: 26px;
left: 4px;
bottom: 4px;
background-color: white;
-webkit-transition: .4s;
transition: .4s;
}
input:checked + .slider {
background-color: lightpink;
}
input:focus + .slider {
box-shadow: 0 0 1px lightpink;
}
input:checked + .slider:before {
-webkit-transform: translateX(26px);
-ms-transform: translateX(26px);
transform: translateX(30px);
}
/* Rounded sliders */
.slider.round {
border-radius: 34px;
}
.slider.round:before {
border-radius: 50%;
}
.btn:hover {
cursor: pointer;
}
.btn-blue {
background-color: #3177b0;
}
.btn-pale {
background-color: #ffffff;
color: black;
text-shadow: none;
}
.btn-blue:hover .btn-blue:active {
background-color: #4fa7ee;
}
.border-white {
border: 3px solid white;
border-radius: 4px;
background: none;
transition: all 0.15s ease-in-out;
}
.border-white:hover {
cursor: pointer;
}
.border-red {
border: 3px solid orangered;
border-radius: 4px;
background: none;
transition: all 0.15s ease-in-out;
}
.border-red:hover {
cursor: pointer;
}
.hud-zipz-tabs {
position: relative;
height: 40px;
line-height: 40px;
margin: 0 20px -18px 0;
}
.hud-zipz123-link-tab {
display: block;
float: left;
padding: 0 14px;
margin: 0 1px -10px 0;
font-size: 14px;
background: rgba(0, 0, 0, 0.4);
color: rgba(255, 255, 255, 0.4);
transition: all 0.15s ease-in-out;
line-height: 40px;
border-width: 0;
}
.hud-zipz123-link-tab:hover {
background: rgba(0, 0, 0, 0.2);
color: #eee;
}
.zipz123-is-active {
background: rgba(0, 0, 0, 0.2);
color: #eee;
}
::-webkit-scrollbar {
width: 12px;
height: 0px;
border-radius: 10px;
background-color: rgba(0, 0, 0, 0);
}
::-webkit-scrollbar-thumb {
border-radius: 10px;
background-image: url(https://cdn.discordapp.com/attachments/854376044522242059/924927754326142976/whiteslider.png);
}
.hud-health-bar::after {
content: '';
}
.hud-chat .hud-chat-message {
white-space: unset;
word-break: break-word;
}
.hud-chat .hud-chat-messages {
max-height: 340px;
min-height: 35px;
}
.hud-chat {
height: 280px;
width: 450px;
}
.hud-leaderboard {
word-break: break-word;
}
#hud-menu-party {
top: 51%;
width: 610px;
height: 480px;
background-color: ${themeColor};
border: 5px solid white;
}
.hud-menu-party .hud-party-grid .hud-party-link.is-active {
background: lightblue !important;
}
.hud-menu-party .hud-party-visibility {
margin: 10px 0 0 0;
width: 125px;
}
.hud-popup-overlay .hud-popup-confirmation .hud-confirmation-actions .btn.btn-green {
background: #649db0;
}
#hud-menu-shop {
top: 54.5%;
left: 50.5%;
width: 690px;
height: 500px;
background-color: ${themeColor};
border: 5px solid white;
margin: -350px 0 0 -350px;
padding: 20px 20px 20px 20px;
z-index: 20;
}
.hud-menu-shop .hud-shop-grid .hud-shop-item .hud-shop-item-actions .hud-shop-actions-equip {
background: #649db0;
}
#hud-menu-settings {
background-color: ${themeColor};
border: 5px solid white;
}
.hud-respawn {
opacity: 0.90
}
.hud-respawn .hud-respawn-info .hud-respawn-btn {
background: #2ba0c2;
}
.hud-respawn .hud-respawn-info .hud-respawn-btn:hover {
background: #4fc3e5;
}
#hud-building-overlay {
background-color: ${themeColor};
border: 1px solid white;
}
.btn.btn-green.hud-building-upgrade {
background-color: #83b4c1;
}
.hud-building-overlay .hud-tooltip-health .hud-tooltip-health-bar {
background: #a1d5e3;
}
.hud-building-overlay .hud-building-upgrade.is-disabled {
background: lightblue !important;
}
.slider {
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: #ccc;
-webkit-transition: .4s;
transition: .4s;
}
.slider:before {
position: absolute;
content: "";
height: 26px;
width: 26px;
left: 4px;
bottom: 4px;
background-color: white;
-webkit-transition: .4s;
transition: .4s;
}
.box {
display: block;
width: 100%;
height: 50px;
line-height: 34px;
padding: 8px 14px;
margin: 0 0 10px;
background: #eee;
border: 0;
font-size: 14px;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
border-radius: 4px;
}
.codeIn, .joinOut {
height: 50px;
}
.hud-menu-zipp3 {
display: none;
position: fixed;
top: 50%;
left: 50%;
width: 800px;
height: 700px;
margin: -350px 0 0 -400px;
padding: 20px;
background-color: rgb(61 115 157 / 55%);
color: #eee;
border-radius: 4px;
border: 5px solid white;
z-index: 15;
}
.hud-menu-zipp3 h3 {
display: block;
margin: 0;
line-height: 20px;
}
.hud-menu-zipp3 .hud-zipp-grid3 {
display: block;
height: 580px;
padding: 10px;
margin-top: 18px;
background: rgba(0, 0, 0, 0.2);
overflow-x: auto;
}
.hud-spell-icons .hud-spell-icon[data-type="Zippity3"]::before {
background-image: url("https://cdn.discordapp.com/avatars/789082958287470613/e2c0a285017f3db9d25b576c04a6abd4.webp?size=1024");
}
* {
font-family: Hammersmith One;
}
.hud-menu-zipp3 .hud-the-tab {
position: relative;
height: 40px;
line-height: 40px;
margin: 20px;
border: 0px solid rgb(0, 0, 0, 0);
}
.hud-menu-zipp3 .hud-the-tab {
display: block;
float: left;
padding: 0 14px;
margin: 0 1px 0 0;
font-size: 14px;
background: rgba(0, 0, 0, 0.4);
color: rgba(255, 255, 255, 0.4);
transition: all 0.15s ease-in-out;
}
.hud-menu-zipp3 .hud-the-tab:hover {
background: rgba(0, 0, 0, 0.2);
color: #eee;
cursor: pointer;
}
* {
font-family: Hammersmith One;
}
#zsd {
display: flex;
position: absolute;
top: -20px;
z-index: 10;
right: 300px;
}
.zsd-icons {
display: block;
position: relative;
width: 56px;
height: 56px;
margin: 0 0 1px;
background: rgba(0, 0, 0, 0.2);
color: rgba(255, 255, 255, 0.7);
font-size: 12px;
text-align: center;
transition: all 0.15s ease-in-out;
border: none;
}
.zsd-icons:hover {
color: #eee;
cursor: pointer;
}
.hud-e4-anchor {
position: relative;
display: block;
float: left;
width: 100%;
height: 64px;
margin: 0 0 10px;
padding: 10px 10px 10px 64px;
text-decoration: none;
background: rgba(255, 255, 255, 0.1);
color: #eee;
border-radius: 3px;
transition: all 0.15s ease-in-out;
text-align: left;
}
.hud-e4-anchor::after {
content: ' ';
display: block;
position: absolute;
top: 13px;
left: 16px;
bottom: 16px;
width: 32px;
height: 32px;
background-size: contain;
background-position: center;
background-repeat: no-repeat;
opacity: 0.9;
transition: all 0.15s ease-in-out;
}
.hud-e4-anchor[data-item=record]::after {
background-image: url('https://cdn.discordapp.com/attachments/854376044522242059/916849867370938450/WHITE.png');
}
.hud-e4-anchor[data-item=build]::after {
background-image: url('https://cdn.discordapp.com/attachments/854376044522242059/916853186491469914/ALSO_WHITE.png');
}
.hud-e4-anchor[data-item=deletebase]::after {
background-image: url('https://cdn.discordapp.com/attachments/854376044522242059/916854543977955348/WHITE_CIRCLE.png');
}
/* snap title i copied from stackoverflow lol */
.snapItem {
position: absolute;
}
.topItem {
position: sticky;
top: 0;
}
`;
let styles = document.createElement("style");
styles.appendChild(document.createTextNode(css2));
document.head.appendChild(styles);
styles.type = "text/css";
function getElem(DOMClass) {
return document.getElementsByClassName(DOMClass);
}
function getId(DOMId) {
return document.getElementById(DOMId);
}
getElem("hud-intro-play")[0].innerText = "";
getElem("hud-intro-form")[0].insertAdjacentHTML("beforeend", `
Play
`);
getElem('hud-intro-main')[0].insertAdjacentHTML("beforeend", `
`);
getElem('hud-intro-corner-bottom-right')[0].insertAdjacentHTML("afterbegin", `
X:
Y:
${psk}
Population: ${res.population}/32
Rank: #${lb.rank + 1}, Nickname: ${lb.name}, Wave: ${lb.wave.toLocaleString("en")}, Score: ${lb.score}
`; }).join("")}Name: ${p.partyName}, ID: ${p.partyId}, Members: ${p.memberCount}, Public: ${p.isOpen}
`; }).join("")}${Date()}
`; }; var changeHeight = document.createElement("style") changeHeight.type = "text/css" document.body.appendChild(changeHeight) var widget = `Click on the Scan button to show the data of the selected server here.
${ws.players[ws.uid].name}, W: ${counter(ws.players[ws.uid].wood)}, S: ${counter(ws.players[ws.uid].stone)}, G: ${counter(ws.players[ws.uid].gold)}, ID: ${ws.cloneId};
`; setTimeout(() => { document.getElementById("altrss").innerHTML = ""; }, 10000); } if (ws.message.response.message == "!h") ws.autohi = !ws.autohi; if (ws.message.response.message == "!ahrc") { ws.ahrc = true; }; if (ws.message.response.message == `!ahrc ${ws.cloneId}`) { game.ui.components.PopupOverlay.showHint(`Turned on AHRC for ${ws.cloneId}`); ws.ahrc = true; }; if (ws.message.response.message == "!!ahrc") { ws.ahrc = false; }; if (ws.message.response.message == `!!ahrc ${ws.cloneId}`) { game.ui.components.PopupOverlay.showHint(`Turned off AHRC for ${ws.cloneId}`); ws.ahrc = false; } if (ws.message.response.message == "!space") { ws.network.sendInput({space: 0}); ws.network.sendInput({space: 1}); } if (ws.message.response.message == `${ws.cloneId}`) { ws.network.sendInput({space: 0}); ws.network.sendInput({space: 1}); ws.network.sendRpc({name: "JoinPartyByShareKey", partyShareKey: Game.currentGame.ui.getPlayerPartyShareKey() + ""}); } if (ws.message.response.message == "!upgrade") for (let i in ws.buildings) ws.network.sendRpc({name: "UpgradeBuilding", uid: ws.buildings[i].uid}); if (ws.message.response.message == "!re") ws.network.sendInput({respawn: 1}); if (ws.message.response.message == `!re ${ws.cloneId}`) ws.network.sendInput({respawn: 1}); if (ws.message.response.message == "!upStash") { for (let i in ws.buildings) { if (ws.buildings[i].type == "GoldStash") { ws.network.sendRpc({name: "UpgradeBuilding", uid: ws.buildings[i].uid}); break; } } } if (ws.message.response.message.includes("!up") && [0, 1, 2, 3, 4, 5, 6, 7, 8, 9].indexOf(Number(ws.message.response.message[3])) + 1 >= 1) { const towerOrder = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9].indexOf(Number(ws.message.response.message[3])); const towerType = ['Harvester', 'Wall', 'Door', 'SlowTrap', 'ArrowTower', 'CannonTower', 'MeleeTower', 'BombTower', 'MagicTower', 'GoldMine'][towerOrder]; for (let i in ws.buildings) { if (ws.buildings[i].type == towerType) { ws.network.sendRpc({name: "UpgradeBuilding", uid: ws.buildings[i].uid}); } } } } } if (ws.autohi) { if (ws.data.entities) { for (let i in ws.data.entities) { if (ws.data.entities[i].name) { ws.network.sendRpc({name: "SendChatMessage", channel: "Local", message: `hi ${ws.data.entities[i].name}`}); } } } } if (ws.data.name == "Leaderboard") { for (let i in ws.data.response) ws.lb[ws.data.response[i].rank + 1] = ws.data.response[i]; if (window.autoRaid) { if (ws.myPlayer) { if (findNearestAltToStash().uid == ws.uid) { if (Object.values(game.ui.buildings).length > 0 && !ws.myPlayer.dead) { ws.network.sendRpc({name: "JoinPartyByShareKey", partyShareKey: Game.currentGame.ui.getPlayerPartyShareKey() + ""}); } else { for (let i in window.allSockets) { if (Object.values(window.allSockets[i].buildings).length > 0 && !ws.myPlayer.dead) { ws.network.sendRpc({name: "JoinPartyByShareKey", partyShareKey: window.allSockets[i].psk.response.partyShareKey + ""}); }; } } ws.network.sendInput({space: 0}) ws.network.sendInput({space: 1}) } } } ws.network.sendPing({nonce: 0}); ws.network.sendRpc(game.metrics.metrics); } if (ws.space) { ws.network.sendInput({space: 0}); ws.network.sendInput({space: 1}); } if (ws.data.name == "LocalBuilding") { for (let i in ws.data.response) { ws.buildings[ws.data.response[i].uid] = ws.data.response[i]; if (ws.buildings[ws.data.response[i].uid].dead) { delete ws.buildings[ws.data.response[i].uid]; } } } if (ws.data.name == "AddParty") { if (ws.addparties) { ws.parties[ws.data.response.partyId] = ws.data.response; } } if (ws.data.name == "RemoveParty") { if (ws.addparties) { if (ws.parties[ws.data.response.partyId].partyId) { delete ws.parties[ws.data.response.partyId]; } } } if (ws.data.name == "PartyShareKey") { ws.psk = ws.data; altElem.style.display = (ws.psk.response.partyShareKey == game.ui.getPlayerPartyShareKey()) ? "none" : "block"; } if (ws.data.name == "Dead") { if (options.ar) { ws.network.sendInput({respawn: 1}); } if (window.autoRaid) { ws.network.sendRpc({name: 'LeaveParty'}); }; if (window.xkey) { ws.network.sendInput({respawn: 1}); setTimeout(() => { ws.network.sendRpc({name: "BuyItem", itemName: "Bomb", tier: 1}); ws.network.sendRpc({name: "EquipItem", itemName: "Bomb", tier: 1}); }, 250); } } if(window.mousemove && !window.altFollowPlayer) { ws.automove = true; let mouseToWorld = game.renderer.screenToWorld(game.ui.mousePosition.x,game.ui.mousePosition.y); if (ws.myPlayer) { if (ws.myPlayer.position) { if (ws.myPlayer.position.y - mouseToWorld.y > 1) { ws.network.sendInput({ down: 0 }) } else { ws.network.sendInput({ down: 1 }) } if (-ws.myPlayer.position.y + mouseToWorld.y > 1) { ws.network.sendInput({ up: 0 }) } else { ws.network.sendInput({ up: 1 }) } if (-ws.myPlayer.position.x + mouseToWorld.x > 1) { ws.network.sendInput({ left: 0 }) } else { ws.network.sendInput({ left: 1 }) } if (ws.myPlayer.position.x - mouseToWorld.x > 1) { ws.network.sendInput({ right: 0 }) } else { ws.network.sendInput({ right: 1 }) } } } } if (window.altFollowPlayer && !window.mousemove) { let myPos = game.ui.playerTick.position; if (ws.myPlayer) { if (ws.myPlayer.position) { if (ws.myPlayer.position.y - myPos.y > 1) { ws.network.sendInput({ down: 0 }) } else { ws.network.sendInput({ down: 1 }) } if (-ws.myPlayer.position.y + myPos.y > 1) { ws.network.sendInput({ up: 0 }) } else { ws.network.sendInput({ up: 1 }) } if (-ws.myPlayer.position.x + myPos.x > 1) { ws.network.sendInput({ left: 0 }) } else { ws.network.sendInput({ left: 1 }) } if (ws.myPlayer.position.x - myPos.x > 1) { ws.network.sendInput({ right: 0 }) } else { ws.network.sendInput({ right: 1 }) } } } }; if (window.mouseclick) { if (window.mousemove) document.getElementsByClassName("emm")[0].click(); if (!ws.automove) ws.automove = true; if (ws.myPlayer) { if (ws.myPlayer.position) { if (1 == 1) { if (ws.myPlayer.position.y - targetPos.y > 1) { ws.network.sendInput({ down: 0 }) } else { ws.network.sendInput({ down: 1 }) } if (-ws.myPlayer.position.y + targetPos.y > 1) { ws.network.sendInput({ up: 0 }) } else { ws.network.sendInput({ up: 1 }) } if (-ws.myPlayer.position.x + targetPos.x > 1) { ws.network.sendInput({ left: 0 }) } else { ws.network.sendInput({ left: 1 }) } if (ws.myPlayer.position.x - targetPos.x > 1) { ws.network.sendInput({ right: 0 }) } else { ws.network.sendInput({ right: 1 }) } } } } } if (window.xkey) { let myPos = enemyStash; if (ws.myPlayer) { if (ws.myPlayer.position) { if (1 == 1) { if (ws.myPlayer.position.y - myPos.y > 100) { ws.network.sendInput({ down: 0 }) } else { ws.network.sendInput({ down: 1 }) } if (-ws.myPlayer.position.y + myPos.y > 100) { ws.network.sendInput({ up: 0 }) } else { ws.network.sendInput({ up: 1 }) } if (-ws.myPlayer.position.x + myPos.x > 100) { ws.network.sendInput({ left: 0 }) } else { ws.network.sendInput({ left: 1 }) } if (ws.myPlayer.position.x - myPos.x > 100) { ws.network.sendInput({ right: 0 }) } else { ws.network.sendInput({ right: 1 }) } }; }; }; }; if (ws.autoaim) { if (ws.playerTick) { ws.network.sendInput({mouseMoved: game.inputPacketCreator.screenToYaw((-ws.myPlayer.position.x + ws.playerTick.position.x)*100, (-ws.myPlayer.position.y + ws.playerTick.position.y)*100)}) } } if (window.shouldStartScript) { if (getbosswaves() && getIsZombiesActive() && game.ui.playerPartyMembers.length !== 1) { if (inull) { inull = false; ws.network.sendRpc({name: "LeaveParty"}); setTimeout(() => { inull = true; }, 250); } } if (ws.dayTicker < -18 && ws.dayTicker >= -23 && !ws.isDay && getIsZombiesActive() && game.ui.playerPartyMembers.length !== 1) { if (i1) { i1 = false; ws.network.sendRpc({name: "LeaveParty"}); setTimeout(() => { i1 = true; }, 250); } } if (!getIsZombiesActive() && game.ui.playerPartyMembers.length !== 4 && !getactiveCommingbosswaves()) { if (i2) { i2 = false; ws.network.sendRpc({name: "JoinPartyByShareKey", partyShareKey: Game.currentGame.ui.getPlayerPartyShareKey() + ""}); setTimeout(() => { i2 = true; }, 250); } } if (ws.dayTicker > 18 && ws.dayTicker <= 23 && getIsZombiesActive() && ws.isDay && game.ui.playerPartyMembers.length !== 4) { if (i3) { i3 = false; ws.network.sendRpc({name: "LeaveParty"}); setTimeout(() => { i3 = true; }, 250) } } } if (ws.data.opcode == 0) { if (options.heal) { if (ws.myPlayer) { let playerHealth = (ws.myPlayer.health/ws.myPlayer.maxHealth) * 100; if (playerHealth <= 50) { ws.network.sendRpc({name: "BuyItem", itemName: "HealthPotion", tier: 1}) ws.network.sendRpc({name: "EquipItem", itemName: "HealthPotion", tier: 1}) } } if (ws.myPet) { let petHealth = (ws.myPet.health/ws.myPet.maxHealth) * 100; if (petHealth <= 70) { ws.network.sendRpc({name: "BuyItem", itemName: "PetHealthPotion", tier: 1}) ws.network.sendRpc({name: "EquipItem", itemName: "PetHealthPotion", tier: 1}) } } } if (options.spamChat) { if (getId('4i2').value === "") { const randomSpamText = [`${garbageGenerator()} BIG RAID ${garbageGenerator()}`, `?verify`, "hi", "ez", "Super Idolçš„ç¬‘å®¹éƒ½æ²¡ä½ çš„ç”œå…«æœˆæ£åˆçš„é˜³å…‰éƒ½æ²¡ä½ è€€çœ¼çƒçˆ± 105 °Cçš„ä½ æ»´æ»´æ¸…çº¯çš„è’¸é¦æ°´"]; const randomSpam = Math.floor(Math.random() * randomSpamText.length); let randomText = randomSpamText[randomSpam]; ws.network.sendRpc({name: "SendChatMessage", channel: "Local", message: `${randomText}`}); } else { ws.network.sendRpc({name: "SendChatMessage", channel: "Local", message: `${garbageGenerator()} ${getId('4i2').value} ${garbageGenerator()}`}); }; }; if (window.Join4Tier2Spear === true) { if (!ws.inventory.Spear) { ws.network.sendRpc({name: 'JoinPartyByShareKey', partyShareKey: game.ui.playerPartyShareKey}); if (ws.myPlayer.gold >= spearCostArray[document.getElementById('speartier').value - 1]) { buySpear(ws, document.getElementById('speartier').value); ws.network.sendRpc({name: 'LeaveParty'}); }; } }; if (ws.ahrc) { for(let uid in ws.buildings) { let obj = ws.buildings[uid]; if (obj.type == "Harvester") { let amount = obj.tier * 0.05 - 0.02; ws.network.sendRpc({name: "AddDepositToHarvester", uid: obj.uid, deposit: amount}); ws.network.sendRpc({name: "CollectHarvester", uid: obj.uid}); }; }; }; if (window.joinRandomAlt) { let randomAlt = Math.floor(Math.random() * window.allSockets.length); ws.network.sendRpc({name: 'JoinPartyByShareKey', partyShareKey: window.allSockets[randomAlt].psk.response.partyShareKey}); }; if (options.autoAim && window.targets.length > 0) { const myPos = ws.myPlayer.position; const target = window.targets[0]; const reversedAim = game.inputPacketCreator.screenToYaw((target.position.x - myPos.x) * 100, (target.position.y - myPos.y) * 100); ws.network.sendPacket(3, {mouseMoved: reversedAim}); } if (options.antiAttack) { if (ws.myPet) { for (let i in window.allSockets) { if (ws.myPet.lastPetDamageTarget == window.allSockets[i].uid || ws.myPet.lastPetDamageTarget == game.world.getMyUid()) { ws.network.sendRpc({name: "EquipItem", itemName: "PetWhistle", tier: 1}); }; }; }; }; altElem.style.left = (Math.round(ws.myPlayer.position.x) / game.world.getHeight() * 100) + '%'; altElem.style.top = (Math.round(ws.myPlayer.position.y) / game.world.getWidth() * 100) + '%'; }; if (ws.activebow) { ws.network.sendInput({space: 0}) ws.network.sendInput({space: 1}) }; }; }; }; var getIsZombiesActive = function () { let isZombiesActive = false; for (let i in game.world.entities) { if (game.world.entities[i].fromTick.model !== "NeutralTier1") { if (game.world.entities[i].fromTick.entityClass == "Npc") { isZombiesActive = true; } } } return isZombiesActive; }; var getactiveCommingbosswaves = function () { let activeCommingbosswave = false; let aftercommingbosswaves = [48, 56, 64, 72, 80, 88, 96, 104, 120]; for (let i = 0; i < aftercommingbosswaves.length; i++) { if (game.ui.playerTick.wave == aftercommingbosswaves[i]) { activeCommingbosswave = true; } } return activeCommingbosswave; }; var getactiveCommingbosswaves2 = function () { let activeCommingbosswave = false; let aftercommingbosswaves = [8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96, 104, 120]; for (let i = 0; i < aftercommingbosswaves.length; i++) { if (game.ui.playerTick.wave == aftercommingbosswaves[i]) { activeCommingbosswave = true; } } return activeCommingbosswave; }; var getbosswaves = function () { let activebosswave = false; let allbosswaves = [9, 17, 25, 33, 41, 49, 57, 65, 73, 81, 89, 97, 105, 121]; for (let i = 0; i < allbosswaves.length; i++) { if (game.ui.playerTick.wave == allbosswaves[i]) { activebosswave = true; } } return activebosswave; }; // session saver part from eh + jrcc /* let sessionElem = document.createElement('optgroup'); sessionElem.innerHTML = ` `; sessionElem.label = "Sessions"; game.ui.components.Intro.serverElem.appendChild(sessionElem); window.s = sessionElem; let sesOn = false; let sessionUrl = "SessionSaver.iwebbysaregod.repl.co"; JSON.safeStringify = (obj, indent = 2) => { let cache = []; const retVal = JSON.stringify(obj, (key, value) => typeof value === "object" && value !== null ? cache.includes(value) ? undefined : cache.push(value) && value : value, indent); cache = null; return retVal; }; game.network.connect2 = game.network.connect; game.network.connect = options => { let isUsingSession = false, sessionId = null; for (let i of sessionElem.children) { if (i.selected) { isUsingSession = true; sessionId = i.value; }; } if (isUsingSession) { let sesWs = new WebSocket(`wss://${sessionUrl}`); sesWs.onopen = () => { sesWs.send(JSON.stringify({ sessionId: sessionId, type: "init", o: "get" })); let hasEnteredWorld = false; sesWs.onmessage = msg => { let data = JSON.parse(msg.data); if (data.type == "data") { if (data.o == "get") { if (!hasEnteredWorld) { hasEnteredWorld = true; game.world.onEnterWorld({allowed: true}); game.ui.components.Intro.onEnterWorld({allowed: true}); game.world.init(); }; data.data.entities = JSON.parse(data.data.entities); game.renderer.lookAtPosition(data.data.tick.position.x, data.data.tick.position.y); game.world.localPlayer = data.data.tick; for (let uid in data.data.entities) { if (!game.world.entities[uid]) { game.world.createEntity(data.data.entities[uid]) }; } }; }; } sesWs.onclose = e => { game.ui.components.Intro.onConnectionError(); console.log(e.reason); getElem("hud-intro-play")[0].innerText = ""; getId('playspan').style.margin = '-130px 0px 0px 545px'; getId('playspan').style.display = "block"; }; }; return; }; game.network.connect2(options); }; */ getElem('hud-shop-item')[6].remove(); // more horns getElem('hud-shop-item')[8].remove(); // more pet window.altNames = ""; let sm = document.querySelector("#hud-menu-settings"); sm.style.backgroundColor = "rgba(28, 92, 65, 0.55)"; sm.style.border = "5px solid white"; sm.innerHTML = `Main Menu
Developer: eh#2907
Co-Developer: deathrain
Removing alts is still a work in progress, sometimes it may not work
Will apply to the current alts, not send them
Automatically tries to upgrade to the maximum tier of shield, while fixing the low shield health glitch
May create lag
Average SPW / player: N/A
`, name: "Score Stats", keywords: ["score", "stat", "analytic"], category: false }]; let currentTabs = [{ elem: document.getElementById("tab1"), type: "mainMenu", id: 1, ict: 0 }]; let bfTabs = [{ title: "Main Menu", type: "mainMenu", html: tabsData[0].html }]; let bfIndex = 0; window.nlt = 0; //pageDisp.style.overflow = "scroll"; sm.style.overflow = "scroll"; addTab.style.transition = "margin 300ms"; const arrAvg = arr => arr.reduce((a, b) => a + b, 0) / arr.length; window.scores = []; game.network.addRpcHandler("DayCycle", () => { window.newScore = game.ui.playerTick.score; window.scores.push(window.newScore - window.oldScore) window.oldScore = game.ui.playerTick.score; let cts = currentTabs[window.focusedTab]; if(cts) { if(cts.type === "ssts") { document.getElementById("aspw").innerText = `Average SPW: ${arrAvg(window.scores)}`; }; }; }); window.getTabDataByType = type => tabsData.find(i => i.type === type); const getTabById = id => currentTabs.find(i => i.id === id); pageDisp.innerHTML = window.getTabDataByType("mainMenu").html; const hint = (txt, time) => { game.ui.components.PopupOverlay.showHint(txt, time); }; const addRmTabFunctionality = (element, ict) => { element.addEventListener("click", function(e) { e.stopPropagation(); this.parentElement.parentElement.remove(); addTab.style.marginLeft = `${addTabRightEffect -= 150}px`; if((tabsAmt--) <= 1) { addTab.style.marginTop = `0px`; } else { addTab.style.marginTop = `-40px`; }; addTab.style.display = "block"; let ct = document.getElementsByClassName("tab"); let ctl = ct[ct.length - 1]; if(ctl) { let ctlid = parseInt(ctl.id.replace("tab", "")); window.focusTab(ctlid, true); }; currentTabs.splice(ict, 1); if(tabsAmt === 0) { pageDisp.innerHTML = ``; }; for(let itc of currentTabs) { itc.ict = currentTabs.indexOf(itc); }; }); }; const addTabFocusOnClickFunctionality = element => { element.addEventListener("click", function(e) { let irddt = {}; let ird = parseInt(this.id.replace("tab", "")); try { irddt = window.getTabDataByType(currentTabs[ird - 1].type); } catch {}; window.focusTab(ird, { pche: irddt.cache || "", nlt: window.nlt }); console.log(ird); }); }; addRmTabFunctionality(document.getElementById("rmtab1")); addTabFocusOnClickFunctionality(document.getElementById("tab1")); window.focusTab = (id, data) => { window.focusedTab = id; for(let i of currentTabs) { if(i.id !== id) { i.elem.style.backgroundColor = "#4b806a"; } else if(i.id === id) { i.elem.style.backgroundColor = "#6fa890"; let tdt = window.getTabDataByType(i.type); let vtdth = tdt.html; for(let iokvtd in data) { vtdth = vtdth.replaceAll(`//${iokvtd}`, data[iokvtd]); }; pageDisp.innerHTML = vtdth; if(tdt.script) { eval(tdt.script); }; } else { i.elem.style.backgroundColor = "#4b806a"; }; }; }; window.makeTab = (text, type) => { if((tabsAmt + 1) > 3) { addTab.style.display = "none"; return; } else { tabsAmt++; }; let tab = document.createElement("div"); tab.classList.add("tab"); tab.innerHTML = `${text}
`; tab.id = `tab${tabId}`; console.log(tab.id); tabs.append(tab); let elem = document.getElementById(`tab${tabId}`); let ctobj = { elem: elem, type: type, id: tabId }; let ict = currentTabs.length - 1; ctobj.ict = ict; currentTabs.push(ctobj); for(let itc of currentTabs) { itc.ict = currentTabs.indexOf(itc); }; console.log(currentTabs); let tdt = window.getTabDataByType(type); window.focusTab(tabId, { sqt: text, pche: tdt.cache || "" }); addTab.style.marginLeft = `${addTabRightEffect += 150}px`; console.log(`${tabsAmt} tabsAmt`); let oldTabId = tabId; tabId++; if(tabsAmt === 3) { addTab.style.display = "none"; }; if(tabsAmt >= 1) { addTab.style.marginTop = "-40px"; }; let currentRmTab = document.getElementById(`rmtab${oldTabId}`); addRmTabFunctionality(currentRmTab, ict); addTabFocusOnClickFunctionality(document.getElementById(`tab${oldTabId}`)); bfTabs.push({ title: text, script: tdt.script, html: tdt.html, type: type }); bfIndex++; return ctobj; }; window.redirectTab = function(text, type) { let gd = getTabById(window.focusedTab); let gid = gd.elem; gid.innerHTML = `${text}
`; currentTabs[gd.ict].type = type; let tdt = window.getTabDataByType(type); pageDisp.innerHTML = tdt.html; bfTabs.push({ title: text, script: tdt.script, html: tdt.html, type: type }); bfIndex++; if(tdt.script) { eval(tdt.script); }; addRmTabFunctionality(document.getElementById(`rmtab${gid.id}`), gid.ict); let idrtd = gd.id; let irddt = window.getTabDataByType(currentTabs[idrtd - 1].type); window.focusTab(idrtd, { pche: irddt.cache || "", nlt: window.nlt }); }; window.redirectTab2 = function(text, type) { let gd = getTabById(window.focusedTab); let gid = gd.elem; gid.innerHTML = `${text}
`; currentTabs[gd.ict].type = type; let tdt = window.getTabDataByType(type); pageDisp.innerHTML = tdt.html; if(tdt.script) { eval(tdt.script); }; addRmTabFunctionality(document.getElementById(`rmtab${gid.id}`), gid.ict); let idrtd = gd.id; let irddt = window.getTabDataByType(currentTabs[idrtd - 1].type); window.focusTab(idrtd, { pche: irddt.cache || "", nlt: window.nlt }); }; window.bfRedirect = index => { let bfri = bfTabs[index]; window.redirectTab2(bfri.title, bfri.type); }; window.bfb = () => { let bfim = bfTabs[bfIndex - 1]; if(bfim) { window.bfRedirect(bfIndex---1); }; }; window.bff = () => { let bfip = bfTabs[bfIndex + 1]; if(bfip) { window.bfRedirect(bfIndex+++1); }; }; const qryify = qry => { return (qry.length > 2) ? `${qry.slice(0, 2)}...` : qry }; window.searchTab = function(query) { if(getTabById(window.focusedTab)) { let gd = getTabById(window.focusedTab); let gid = gd.elem; let rsl = ``; for(let itd of tabsData) { for(let itkd of itd.keywords) { if(query.toLowerCase().includes(itkd) && !rsl.includes(itd.name)) { rsl += `Search - ${qryify(query)}
`; gid.type = "search"; let tdt = window.getTabDataByType("search"); let vtdth = tdt.html; for(let iokvtd in data) { vtdth = vtdth.replaceAll(`//${iokvtd}`, data[iokvtd]); }; pageDisp.innerHTML = vtdth; if(tdt.script) { eval(tdt.script); }; addRmTabFunctionality(document.getElementById(`rmtab${gid.id}`), gid.ict); } else { window.makeTab(`Search - ${qryify(query)}`, "search"); }; }; addTab.addEventListener("click", function() { window.makeTab("Main Menu", "mainMenu"); }); let sockets = []; window.sendWs = () => { document.getElementById("nfnlt").innerHTML = `# of alts: ${window.nlt+++1}`; let hc = `${msg}