Guest User

Untitled

a guest
Mar 2nd, 2017
37
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <html>
  2. <head>
  3.     <script>
  4.     var cookies=0;
  5.     var up1 = false;
  6.     var up1zaehler = 0;
  7.     var up2 = false;
  8.     var up2zaehler = 0;
  9.     function anzeigen(){
  10.         document.getElementById("a1").innerHTML = Math.round(cookies*100)/100;
  11.         document.getElementById("a2").innerHTML = up1zaehler*0.1 + up2zaehler*1;
  12.         setTimeout("anzeigen()",10);
  13.  
  14.     }
  15.     function click1(){
  16.         cookies++;
  17.     }
  18.    
  19.     function Upgrade1(){
  20.         if(cookies>=10){
  21.         cookies=cookies-10;
  22.         up1 = true;
  23.         up1zaehler++;
  24.  
  25.         setTimeout("test()",1000)
  26.         }
  27.         else{
  28.             alert("Du hast nicht genug Cookies!");
  29.         }
  30.     }
  31.  
  32.     function Upgrade2(){
  33.         if(cookies>=20){
  34.         cookies=cookies-20;
  35.         up2 = true;
  36.         up2zaehler++;
  37.  
  38.         setTimeout("test()",1000)
  39.         }
  40.         else{
  41.             alert("Du hast nicht genug Cookies!");
  42.         }
  43.  
  44.  
  45.     }
  46.  
  47.     function test(){
  48.         if(up1==true){
  49.             cookies = cookies + 0.1;
  50.  
  51.         }
  52.         if(up2==true){
  53.             cookies = cookies + 1;
  54.            
  55.         }
  56.         setTimeout("test()",1000);
  57.     }
  58.  
  59.     function save(){
  60.  
  61.         document.cookie = cookies;
  62.     }
  63.     function laden(){
  64.  
  65.         if(document.cookie){
  66.             cookies = document.cookie;
  67.         }
  68.     }
  69.     </script>
  70. </head>
  71. <body onload="anzeigen()">
  72.     <img src="cookie.png"onclick="click1()"></br>
  73.     Cookies: <div  id="a1"></div></br>
  74.     CookiesPerSecond: <div  id="a2"></div>
  75.     <input type="button" value="Klicker(0.1cps)" onclick="Upgrade1()">
  76.     <input type="button" value="Oma(1cps)" onclick="Upgrade2()">
  77.     <input type="button" value="Save" onclick="save()">
  78.     <input type="button" value="Laden" onclick="laden()">
  79. </body>
  80. </html>
RAW Paste Data