Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var cmenu = document.createElement("p"); document.body.appendChild(cmenu); cmenu.outerHTML=`<div id="xynhack" style="position: absolute; height: 240px; background: rgba(128, 128, 128, 0.5); width: 180px; border-radius: 15px; border-color: rgb(0, 0, 0); top: 326px; left: 526px;"><big style="font-size:75">⠀⠀⠀Cookie Compass (WIP)</big><div></div><a onclick="addcookies()">Add Cookies</a><div></div><a onclick="Game.cookies=Number(-15000)">Go In Debt</a><div></div><a onclick="Game.cookies='-15000'">Screw Your Game</a><div></div><a onclick="removeAds()">Delete Ads</a><div></div><a onclick="document.getElementById('bakeryName').innerHTML=prompt('What would you like to rename the bakery to?');">Rename Bakery</a><div></div><a onclick="Game.cookies=0">Reset Cookies</a><div></div><a onclick="Game.cookiesPs=prompt('What would you like to set your CPS to?')">Cookies Per Second</a><div></div><a onclick="partymode()">Party Mode</a><div></div><a target="_newtab" href='https://pastebin.com/u/game_logic'">My Pastebin</a></div>`;
- // Make the DIV element draggable:
- function dragElement(elmnt) {
- var pos1 = 0, pos2 = 0, pos3 = 0, pos4 = 0;
- if (document.getElementById(elmnt.id + "header")) {
- // if present, the header is where you move the DIV from:
- document.getElementById(elmnt.id + "header").onmousedown = dragMouseDown;
- } else {
- // otherwise, move the DIV from anywhere inside the DIV:
- elmnt.onmousedown = dragMouseDown;
- }
- function dragMouseDown(e) {
- e = e || window.event;
- e.preventDefault();
- // get the mouse cursor position at startup:
- pos3 = e.clientX;
- pos4 = e.clientY;
- document.onmouseup = closeDragElement;
- // call a function whenever the cursor moves:
- document.onmousemove = elementDrag;
- }
- function elementDrag(e) {
- e = e || window.event;
- e.preventDefault();
- // calculate the new cursor position:
- pos1 = pos3 - e.clientX;
- pos2 = pos4 - e.clientY;
- pos3 = e.clientX;
- pos4 = e.clientY;
- // set the element's new position:
- elmnt.style.top = (elmnt.offsetTop - pos2) + "px";
- elmnt.style.left = (elmnt.offsetLeft - pos1) + "px";
- }
- function closeDragElement() {
- // stop moving when mouse button is released:
- document.onmouseup = null;
- document.onmousemove = null;
- }
- }; function addcookies() { Game.cookies=Number(Game.cookies)+Number(prompt("How many cookies would you like to add?")); };
- dragElement(document.getElementById("xynhack")); document.getElementById("topBar").outerHTML='<div id="topBar"> <div><b style="font-weight:bold;">Cookie Clicker (Xyns Hack Edition)</b>™ © <a href="https://www.youtube.com/channel/UCBOLNLmUJCgnwh0gDAPBclg" target="_blank" id="topbarOrteil">SUB TO XYNS YOUTUBE</a>, 2022 - </div> <div style="float:right;"><a id="changeLanguage" style="font-variant:small-caps;">Change language</a></div> </div>';
- function removeAds() { document.getElementById(`smallSupport`).outerHTML=``; document.getElementsByClassName(`ifNoAds`).outerHTML=``; document.getElementById(`support`).outerHTML=``; document.getElementById(`detectAds`).outerHTML=``; };
- function partymode() { document.getElementById("backgroundCanvas").outerHTML='<img id="backgroundCanvas" width="1920" height="1080" style="background: transparent;" src="https://i.imgur.com/t86XZNg.gif">'; document.getElementById("wrapper").style='background:url(https://i.imgur.com/t86XZNg.gif);width: 100%; height: 100%;' };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement