Advertisement
Ineentho

Untitled

Mar 21st, 2014
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. game.World.prototype.collide = function (a) {
  2.     if(a.collideAgainst != 1 && !window.canDie)
  3.         return false;
  4.     if (!this.collisionGroups[a.collideAgainst]) return;
  5.     var i, b;
  6.     for (i = this.collisionGroups[a.collideAgainst].length - 1; i >= 0; i--) {
  7.         b = this.collisionGroups[a.collideAgainst][i];
  8.         if (a !== b)
  9.             this.solver.solve(a, b);
  10.     }
  11. }
  12.  
  13. function toggleInvincible() {
  14.     window.canDie = !window.canDie;
  15.     jQuery(".invincible").text(!window.canDie ? "Disable Hack" : "Enable Hack");
  16. }
  17.  
  18. jQuery(".game").append("<div style='position: absolute; left: calc(50% - 170px); top: 0'><a onclick='toggleInvincible()' class='invincible'>Toggle Invincible</a></div>");
  19.  
  20. for(var i = 0; i < 2; i++)
  21.     toggleInvincible();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement