Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Awful Cookies Cheats
- //Global Variables
- var autoClicker = setInterval(Game.ClickCookie, 1000000);
- //Creating elements
- function createcolorchoice() {
- var input = document.createElement("input");
- input.setAttribute("id", "color");
- input.setAttribute("type", "color");
- input.setAttribute("value", "#ffffff");
- document.getElementById("Cheats").appendChild(input);
- }
- function createrange() {
- var input = document.createElement("input");
- input.setAttribute("id", "cookieclicks");
- input.setAttribute("type", "range");
- input.setAttribute("max", "1000");
- input.setAttribute("style", "transform: rotateY(180deg); width: 150px;");
- input.setAttribute("min", "0.1");
- input.setAttribute("value", "500");
- document.getElementById("Cheats").appendChild(input);
- }
- function createbutton10() {
- var button = document.createElement("button");
- button.setAttribute("id", "button10");
- button.setAttribute("onclick", "antilag()");
- button.setAttribute("class", "Cheatbutton");
- var t = document.createTextNode("Antilag ON"); // Create a text node
- button.appendChild(t); // Append the text to <button>
- document.getElementById("Cheats").appendChild(button);
- }
- function createbutton9() {
- var button = document.createElement("button");
- button.setAttribute("id", "button9");
- button.setAttribute("onclick", "unstyle()");
- button.setAttribute("class", "Cheatbutton");
- var t = document.createTextNode("Remove Colour"); // Create a text node
- button.appendChild(t); // Append the text to <button>
- document.getElementById("Cheats").appendChild(button);
- }
- function createbutton() {
- var button = document.createElement("button");
- button.setAttribute("id", "button");
- button.setAttribute("onclick", "hack()");
- button.setAttribute("class", "Cheatbutton");
- var t = document.createTextNode("Make all buildings free"); // Create a text node
- button.appendChild(t); // Append the text to <button>
- document.getElementById("Cheats").appendChild(button);
- }
- function createselect() {
- var select = document.createElement("select");
- select.setAttribute("id", "styletype");
- document.getElementById("Cheats").appendChild(select);
- backgroundcookie()
- cookie()
- menu()
- store()
- menu2()
- }
- //Creating the options for the select
- function store()
- {
- var option = document.createElement("option");
- option.setAttribute("value", "sectionRight");
- option.innerHTML = "Store"
- document.getElementById("styletype").appendChild(option);
- }
- function menu2()
- {
- var option = document.createElement("option");
- option.setAttribute("value", "sectionMiddle");
- option.innerHTML = "Main Background"
- document.getElementById("styletype").appendChild(option);
- }
- function menu()
- {
- var option = document.createElement("option");
- option.setAttribute("value", "menu");
- option.innerHTML = "Menu"
- document.getElementById("styletype").appendChild(option);
- }
- function cookie()
- {
- var option = document.createElement("option");
- option.setAttribute("value", "bigCookie");
- option.innerHTML = "Big Cookie"
- document.getElementById("styletype").appendChild(option);
- }
- function backgroundcookie()
- {
- var option = document.createElement("option");
- option.setAttribute("value", "backgroundLeftCanvas");
- option.innerHTML = "Background Behind Cookie"
- document.getElementById("styletype").appendChild(option);
- }
- function createbutton8() {
- var button = document.createElement("button");
- button.setAttribute("id", "button8");
- button.setAttribute("onclick", "stylecookie()");
- button.setAttribute("class", "Cheatbutton");
- var t = document.createTextNode("Change colour of..."); // Create a text node
- button.appendChild(t); // Append the text to <button>
- document.getElementById("Cheats").appendChild(button);
- }
- function createbutton7() {
- var button = document.createElement("button");
- button.setAttribute("id", "button7");
- button.setAttribute("onclick", "setname()");
- button.setAttribute("class", "Cheatbutton");
- var t = document.createTextNode("Custom Bakery Name"); // Create a text node
- button.appendChild(t); // Append the text to <button>
- document.getElementById("Cheats").appendChild(button);
- }
- function createbutton3() {
- var button = document.createElement("button");
- button.setAttribute("class", "Cheatbutton");
- button.setAttribute("id", "button1");
- button.setAttribute("onclick", "hack2()");
- var t = document.createTextNode("Spawn Golden Cookie"); // Create a text node
- button.appendChild(t); // Append the text to <button>
- document.getElementById("Cheats").appendChild(button);
- }
- function createbutton6() {
- var button = document.createElement("button");
- button.setAttribute("id", "button6");
- button.setAttribute("onclick", "hack5()");
- button.setAttribute("class", "Cheatbutton");
- var t = document.createTextNode("Party Mode ON"); // Create a text node
- button.appendChild(t); // Append the text to <button>
- document.getElementById("Cheats").appendChild(button);
- }
- function createbutton4() {
- var button = document.createElement("button");
- button.setAttribute("class", "Cheatbutton");
- button.setAttribute("id", "button1");
- button.setAttribute("onclick", "hack3()");
- var t = document.createTextNode("Ruin the fun!"); // Create a text node
- button.appendChild(t); // Append the text to <button>
- document.getElementById("Cheats").appendChild(button);
- }
- function createinput() {
- var button = document.createElement("input");
- button.setAttribute("id", "input");
- button.setAttribute("type", "number");
- document.getElementById("Cheats").appendChild(button);
- }
- function creatediv() {
- var div = document.createElement("div");
- div.setAttribute("id", "Cheats");
- div.setAttribute("style", "position: fixed; bottom: 0; right: 0; display: none;");
- document.getElementById("bakeryNameAnchor").appendChild(div);
- }
- function creatediv2() {
- var div = document.createElement("div");
- div.setAttribute("id", "show");
- div.setAttribute("style", "position: fixed; bottom: 605px; right: 215px;");
- document.getElementById("bakeryNameAnchor").appendChild(div);
- createshowbutton()
- }
- function creatediv3() {
- var div = document.createElement("div");
- div.setAttribute("id", "showoptions");
- div.setAttribute("style", "position: fixed; bottom: 605px; right: 18px;");
- document.getElementById("bakeryNameAnchor").appendChild(div);
- createoptionsbutton()
- }
- function creatediv4() {
- var div = document.createElement("div");
- div.setAttribute("id", "Options");
- div.setAttribute("style", "position: fixed; bottom: 0; right: 0; display: none;");
- document.getElementById("bakeryNameAnchor").appendChild(div);
- }
- function createoptionsbutton() {
- var button = document.createElement("button");
- button.setAttribute("id", "optionsmenubutton");
- button.setAttribute("class", "Cheatbutton");
- button.setAttribute("style", "width: 100px;");
- button.setAttribute("onclick", "thememenu()");
- var t = document.createTextNode("Show Options"); // Create a text node
- button.appendChild(t);
- document.getElementById("showoptions").appendChild(button);
- }
- function createshowbutton() {
- var button = document.createElement("button");
- button.setAttribute("id", "cheatmenu");
- button.setAttribute("class", "Cheatbutton");
- button.setAttribute("onclick", "cheatmenu()");
- var t = document.createTextNode("Show Cheat"); // Create a text node
- button.appendChild(t);
- document.getElementById("show").appendChild(button);
- }
- function createbutton2() {
- var button = document.createElement("button");
- button.setAttribute("class", "Cheatbutton");
- button.setAttribute("id", "button1");
- button.setAttribute("onclick", "setCookies()");
- var t = document.createTextNode("Set Cookies"); // Create a text node
- button.appendChild(t); // Append the text to <button>
- document.getElementById("Cheats").appendChild(button);
- }
- function createbutton5() {
- var button = document.createElement("button");
- button.setAttribute("class", "Cheatbutton");
- button.setAttribute("id", "button5");
- button.setAttribute("onclick", "hack4()");
- var t = document.createTextNode("Auto Clicker ON"); // Create a text node
- button.appendChild(t); // Append the text to <button>
- document.getElementById("Cheats").appendChild(button);
- //Warning it loaded
- }
- function Welcome()
- {
- window.alert("Awful Cookie Cheats Loaded")
- }
- //Running the functions
- Welcome()
- stylemystuff()
- creatediv2()
- creatediv3()
- creatediv4()
- creatediv()
- createbutton()
- createbutton7()
- createbutton8()
- createcolorchoice()
- createbutton9()
- createselect()
- createbutton3()
- createinput()
- createbutton2()
- createbutton4()
- createbutton5()
- createrange()
- createbutton6()
- createbutton10()
- //Hack functions
- function hack3()
- {
- Game.RuinTheFun()
- }
- function setname()
- {
- var name = document.getElementById("bakeryName")
- var newname = prompt("What would you like to be called?", "");
- if (newname != null) {
- name.innerHTML = "" + newname
- }
- }
- function unstyle()
- {
- var id = document.getElementById("styletype").value;
- var newid = document.getElementById("" + id)
- newid.setAttribute("style", "");
- }
- function stylecookie()
- {
- var id = document.getElementById("styletype").value;
- var newid = document.getElementById("" + id)
- var color = document.getElementById("color").value;
- if (color != null) { // Create a "class" attribute
- newid.setAttribute("style", "background-color: " + color + ";");
- }
- }
- function hack4()
- {
- document.getElementById("cookieclicks").disabled = true;
- var clicks = document.getElementById("cookieclicks").value;
- var button = document.getElementById("button5")
- button.innerHTML = "Auto Clicker OFF"
- button.setAttribute("onclick", "unhack4()");
- autoClicker = setInterval(Game.ClickCookie, clicks);
- }
- function unhack4()
- {
- clearInterval(autoClicker);
- document.getElementById("cookieclicks").disabled = false;
- var clicks = document.getElementById("cookieclicks").value;
- var button = document.getElementById("button5")
- button.innerHTML = "Auto Clicker ON"
- button.setAttribute("onclick", "hack4()");
- }
- function hack2()
- {
- Game.goldenCookie.time = 0;
- Game.goldenCookie.spawn();
- }
- function hack5()
- {
- var button = document.getElementById("button6")
- Game.PARTY = true;
- button.innerHTML = "Party Mode OFF"
- button.setAttribute("onclick", "unhack5()");
- }
- function unhack5()
- {
- var button = document.getElementById("button6")
- Game.PARTY = false;
- button.innerHTML = "Party Mode ON"
- button.setAttribute("onclick", "hack5()");
- }
- function cheatmenu()
- {
- var button = document.getElementById("cheatmenu")
- var div = document.getElementById("Cheats")
- button.innerHTML = "Hide Cheat"
- button.setAttribute("onclick", "cheatmenu2()");
- div.setAttribute("style", "position: fixed; bottom: 0; right: 0;");
- }
- function thememenu()
- {
- var button = document.getElementById("optionsmenubutton")
- var div = document.getElementById("Options")
- button.innerHTML = "Hide Options"
- button.setAttribute("onclick", "thememenu2()");
- div.setAttribute("style", "position: fixed; bottom: 0; right: 0;");
- }
- function thememenu2()
- {
- var button = document.getElementById("optionsmenubutton")
- var div = document.getElementById("Options")
- button.innerHTML = "Show Options"
- button.setAttribute("onclick", "thememenu()");
- div.setAttribute("style", "position: fixed; bottom: 0; right: 0; display: none;");
- }
- function cheatmenu2()
- {
- var button = document.getElementById("cheatmenu")
- var div = document.getElementById("Cheats")
- button.innerHTML = "Show Cheat"
- button.setAttribute("onclick", "cheatmenu()");
- div.setAttribute("style", "position: fixed; bottom: 0; right: 0; display: none;");
- }
- function unantilag()
- {
- Game.fps = 30;
- var button = document.getElementById("button10")
- button.innerHTML = "Antilag ON"
- button.setAttribute("onclick", "antilag()");
- }
- function antilag()
- {
- Game.fps = 60;
- var button = document.getElementById("button10")
- button.innerHTML = "Antilag OFF"
- button.setAttribute("onclick", "unantilag()");
- }
- function hack()
- {
- Game.ObjectsById.forEach(function (e) {
- e.basePrice = 0;
- e.refresh();
- });
- Game.storeToRebuild = 1;
- }
- function setCookies()
- {
- var cookies = document.getElementById("input").value;
- Game.Earn( + cookies);
- }
- //Styling
- function stylemystuff()
- {
- var css = '.Cheatbutton {' +
- ' position: relative;' +
- 'background-color: #0099ff;' +
- 'border: none;' +
- 'color: #FFFFFF;' +
- 'text-align: center;' +
- '-webkit-transition-duration: 0.4s; /* Safari */' +
- 'transition-duration: 0.4s;' +
- 'text-decoration: none;' +
- 'overflow: hidden;' +
- 'cursor: pointer;' +
- '}' +
- '.Cheatbutton:after {' +
- 'content: "";' +
- 'background: #000099;' +
- 'display: block;' +
- 'position: absolute;' +
- 'padding-top: 300%;' +
- 'padding-left: 350%;' +
- 'margin-left: -20px!important;' +
- 'margin-top: -120%;' +
- 'opacity: 0;' +
- 'transition: all 0.8s' +
- '}' +
- '.Cheatbutton:active:after {' +
- 'padding: 0;' +
- 'margin: 0;' +
- 'opacity: 1;' +
- 'transition: 0s' +
- '}' +
- '#color {' +
- 'background-color: #0099ff;' +
- '}' +
- '#styletype {' +
- 'background-color: #0099ff;' +
- 'color: #ffffff;' +
- 'font-weight: bold;' +
- 'font-size: 15px;' +
- '}' +
- '#input {' +
- 'background-color: #0099ff;' +
- 'color: #ffffff;' +
- 'font-weight: bold;' +
- 'font-size: 12px;' +
- '}' +
- 'button.Cheatbutton {' +
- 'height: 35px;' +
- 'font-weight: bold;' +
- 'font-size: 15px;' +
- '}' +
- '#styletype {' +
- 'height: 35px;' +
- '}' +
- '#input {' +
- 'height: 30px;' +
- '}' +
- '#color {' +
- 'padding-left: 2px;' +
- 'padding-bottom: 7px;' +
- 'height: 25px;' +
- '}' +
- '#input {' +
- 'font-size: 15px;' +
- '}',
- head = document.head || document.getElementsByTagName('head')[0],
- style = document.createElement('style');
- style.type = 'text/css';
- if (style.styleSheet){
- style.styleSheet.cssText = css;
- } else {
- style.appendChild(document.createTextNode(css));
- }
- head.appendChild(style);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement