peacestorm

Fooling around you know

Dec 15th, 2019
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var hitbox = false;
  2. var fly = false;
  3.  
  4. function chatHook(text) {
  5.     var spli = text.split(" ");
  6.  
  7.     if (text == ".help") {
  8.         preventDefault();
  9.         clientMessage("Welcome to CMDV1 made by Founder");
  10.         clientMessage(".hitbox");
  11.         clientMessage(".fly");
  12.     }
  13.  
  14.     if (text == ".hitbox") {
  15.         preventDefault();
  16.         if (!hitbox) {
  17.             hitbox = true;
  18.             clientMessage("Hitbox Enabled");
  19.         } else {
  20.             hitbox = false;
  21.             clientMessage("Hitbox Disabled");
  22.         }
  23.     }
  24.  
  25.     if (text == ".fly") {
  26.         preventDefault();
  27.         if (fly == false) {
  28.             fly = true;
  29.             clientMessage("Fly Enabled");
  30.         } else {
  31.             fly = false;
  32.             clientMessage("Fly Disabled");
  33.         }
  34.     }
  35.  
  36.     if (fly) {
  37.         Player.setCanFly(1);
  38.         Player.setFlying(1);
  39.     } else {
  40.         Player.setFlying(0);
  41.         if(Level.getGameMode() != 1) {
  42.             Player.setCanFly(0);
  43.         }
  44.     }
  45. }
  46.  
  47. function attackHook(att, vic) {
  48.     if (hitbox) {
  49.         Entity.setCollisionSize(vic, 5, 5);
  50.     } else {
  51.         Entity.setCollisionSize(vic, 0.6, 1.8);
  52.     }
  53. }
Advertisement
Add Comment
Please, Sign In to add comment