Yawin

Cookies

Sep 24th, 2013
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. setInterval(function(){
  2. Game.ObjectsById[0].buy();
  3. Game.ObjectsById[1].buy();
  4. Game.ObjectsById[2].buy();
  5. Game.ObjectsById[3].buy();
  6. Game.ObjectsById[4].buy();
  7. Game.ObjectsById[5].buy();
  8. Game.ObjectsById[6].buy();
  9. Game.ObjectsById[7].buy();
  10. Game.ObjectsById[8].buy();
  11. Game.ObjectsById[9].buy();
  12. },1)
  13.  
  14. setInterval(function(){
  15. Game.ClickCookie();
  16. },1)
  17.  
  18. setInterval(function() {
  19.     Game.goldenCookie.click();
  20. }, 100);
  21.  
  22. if (window.webkitNotifications.checkPermission()) {
  23.   function askPermission() {
  24.     window.webkitNotifications.requestPermission();
  25.     var element = document.getElementById('notifier_permission');
  26.     element.parentNode.removeChild(element);
  27.   }
  28.  
  29.   var ask = document.createElement('BUTTON');
  30.   var askText = document.createTextNode('Ask for notification permission');
  31.   ask.id = 'notifier_permission';
  32.   ask.style.position = 'absolute';
  33.   ask.style.zIndex = 99999999;
  34.   ask.appendChild(askText);
  35.   document.body.appendChild(ask);
  36.   ask.onclick = askPermission;
  37. }
  38.  
  39. Game.goldenCookie.spawn = (function() {
  40.   var spawn = Game.goldenCookie.spawn;
  41.   return function() {
  42.     webkitNotifications.createNotification('img/goldCookie.png', 'Cookie Clicker', 'A wild golden cookie appeared!').show();
  43.     spawn();
  44.   };
  45. })();
Advertisement
Add Comment
Please, Sign In to add comment