Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title>Cookie Clacker</title>
- <b><font face="bankgothic lt bt" color="orange" size="4">
- <center>Welcome To Cookie Clacker<br><br>
- <div style="position: absolute; right: 0;">
- Shop
- <br>
- <button onclick="fdouble()" id="double">Double You're Cookies (100 Cookies)</button>
- <br>
- <button onclick="fbomb()" id="bomb">Atomic Bomb (400 Cookies)</button>
- <br />
- <button onclick="ftest()" id="test">Test (10000000000000 Cookies)</button>
- </div>
- <script type="text/javascript">
- var total = 0;
- var m = 1;
- var double = 0;
- var bomb = 0;
- var test = 0;
- var sizeddown = 0;
- function countClicks() {
- total = total + m;
- document.getElementById("cookies").innerHTML = total;
- sizedown();
- }
- function sizedown(){
- document.getElementById("cookie").innerHTML = "<img onclick='javascript:countClicks();' src='http://www.pindarcreative.co.uk/images/cookie.png' alt='alt text' width='245' height='245'/>"
- ;
- countdown = setTimeout('sizeup()', 50);
- setTimeout('sizeup()', 50);
- }
- function sizeup(){
- document.getElementById("cookie").innerHTML = "<img onclick='javascript:countClicks();' src='http://www.pindarcreative.co.uk/images/cookie.png' alt='alt text' width='250' height='250'/>"
- ;
- }
- function fdouble() {
- if(total >= 100 && bomb == 0){
- total = total - 100;
- m = m*2;
- double = 1;
- document.getElementById("double").style.visibility="hidden";
- document.getElementById("cookies").innerHTML = total;
- }
- }
- function fbomb() {
- if(total >= 400){
- total = total - 400;
- m = 100;
- document.getElementById("bomb").style.visibility="hidden";
- }
- document.getElementById("cookies").innerHTML = total;
- }
- function ftest(){
- if(total >= 10){
- test = 1;
- total = total - 10;
- document.getElementById("test").style.visibility="hidden";
- document.getElementById("cookies").innerHTML = total;
- }
- }
- function countdown_trigger() {
- if(test == 1){
- total++;
- }
- document.getElementById('cookies').innerHTML = total;
- countdown = setTimeout('countdown_trigger()', 1000);
- }
- setTimeout('countdown_trigger()', 1000);
- </script>
- </font>
- </head>
- <body>
- <p id="cookie">
- <img onclick="javascript:countClicks();" src="http://www.pindarcreative.co.uk/images/cookie.png" alt="alt text" width="250" height="250"/>
- </p>
- <font face="bankgothic lt bt" color="orange" size="4">Cookies: <p id="cookies" style="color:orange">0</font></p></b>
- <body background="http://www.hdpaperwall.com/wp-content/uploads/2013/10/bg.jpg">
- </body></center>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement