So, I decided to make a cookie clicker. It’s not very good yet, but this was the first project I made after learning a bit of JavaScript. If you have any suggestions on how I can make this better, please tell me! Also, it saves data! That was probably the part I spent the most time on.
try{var x;function hax(){x=setInterval(ClickUp)}
function stopHax(){clearInterval(x)}
function setCookies(intPlz){clicks=intPlz}
function addCookies(intPlz){clicks+=intPlz-1}
setInterval(()=>{if(clicks==Infinity){clicks=1e+100;console.log("Oops! Looks like the amount of cookies reached infinity! Don't worry, I have set it back to 1e+100.");}});console.log("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\Successfull Injection.");}catch{console.log("Oops! Looks like there was an issue. Please contact chez!")}
To start hax, type hax() in console. To stop hax, type stopHax() in console.
Have fun!
Edit: @NoelBryan pointed a might be a problem problem so I updated the above just in case it doesn't save. :D
Also I added 2 new funcs:
To set the cookies, do setCookies(--THE NUMBER OF COOKIES--) To add to the cookies, do addCookies(--THE NUMBER OF COOKIES--)
Have fun!
x2
DOCUMENTATION:
hax() - Adds like a million cookies every second stopHax() - Stops the hax above. setCookies(--COOKIES--) - Sets the cookies to the amount specified. addCookies(--COOKIES--) - Adds the cookies to the current amount you have.
NEW! Now with auto infinity correction! - Automatically sets the amount of cookies to 1e+100 if the cookies suddenly reach infinity.
I tried to do this: function hax(){ alert(‘You tried to use ChezCoder’s hax didn’t you?’) } But it didn’t work. I can’t think of any other way to stop this lol @ChezCoder
@NoelBryan thats cuz my hax redefines the function hax(). Its like you declare the variable x. But my script re-declares it or "changes the script" for the function.
@NoelBryan a way to patch it is to change the variables and function names so that my code wont match yours. But I can just change it to what you changed your variables and functions to. This isn't really a patch but rather something annoying for exploiters.
So, I decided to make a cookie clicker. It’s not very good yet, but this was the first project I made after learning a bit of JavaScript. If you have any suggestions on how I can make this better, please tell me! Also, it saves data! That was probably the part I spent the most time on.
I created exploit. Just paste this in console.
To start hax, type
hax()
in console.To stop hax, type
stopHax()
in console.Have fun!
Edit: @NoelBryan pointed a might be a problem problem so I updated the above just in case it doesn't save. :D
Also I added 2 new funcs:
To set the cookies, do
setCookies(--THE NUMBER OF COOKIES--)
To add to the cookies, do
addCookies(--THE NUMBER OF COOKIES--)
Have fun!
x2
DOCUMENTATION:
hax()
- Adds like a million cookies every secondstopHax()
- Stops the hax above.setCookies(--COOKIES--)
- Sets the cookies to the amount specified.addCookies(--COOKIES--)
- Adds the cookies to the current amount you have.NEW! Now with auto infinity correction! - Automatically sets the amount of cookies to 1e+100 if the cookies suddenly reach infinity.
But that won’t save your data unless you click on the cookie also. @ChezCoder
Edit: wait it will dang it
Edit2: but it won’t work for people on mobile
I think I patched it! @ChezCoder
@NoelBryan nope, just tested it XD
I tried to do this:
function hax(){
alert(‘You tried to use ChezCoder’s hax didn’t you?’)
}
But it didn’t work.
I can’t think of any other way to stop this lol
@ChezCoder
@NoelBryan thats cuz my hax redefines the function
hax()
. Its like you declare the variable x. But my script re-declares it or "changes the script" for the function.Ohhhhhh, dang it. @ChezCoder
@NoelBryan lol
I’ll overwrite your function lol in the game @ChezCoder
I’m trying to overwrite the function every second but it’s not working @ChezCoder
@NoelBryan a way to patch it is to change the variables and function names so that my code wont match yours. But I can just change it to what you changed your variables and functions to. This isn't really a patch but rather something annoying for exploiters.
Ok @ChezCoder
@NoelBryan i have infinity cookies....
Noooooooooooooo I failed @ChezCoder
@NoelBryan lol i can't buy anothing now... also to change the variables, you can do find and replace with ctrl + f or cmd + f for mac
Wait you actually can’t buy anything now? :) @ChezCoder
Just use the reset button
@NoelBryan cuz
Infinity
is not a number.I can just use my other hax to set it to 0
Awww, cmon @ChezCoder
It’s great that infinity is not a number though
@NoelBryan i can easily change that >:)
why >:( noooo @ChezCoder
@NoelBryan done >:) auto infinity correction, a bunch of bug fixes, and I styled it in a way to make it look fancy
:( @ChezCoder