CCBlueX Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups

    NameTags deobf (not 100%)

    Scripts
    5
    6
    597
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • DreamWasFucked
      DreamWasFucked Banned last edited by DreamWasFucked

      Original script

      var scriptName = 'NameTags';
      var scriptAuthor = 'Wu_dian';
      var scriptVersion = 1.0;
      
      var GlStateManager = Java.type('net.minecraft.client.renderer.GlStateManager');
      var EntityPlayer = Java.type('net.minecraft.entity.player.EntityPlayer');
      var GL11 = Java.type('org.lwjgl.opengl.GL11');
      
      script.import('lib/glFunctions.js');
      script.import('lib/systemFunctions.js');
      
      function SHealth() {
          function drawHealthBar(entity) {
              var color = '0xFF' + healthColor(entity.getHealth(), entity.getMaxHealth());
              var healthPercent = toPercent(entity.getHealth(), entity.getMaxHealth());
      
              drawRect(50.0, -55.0, -50.0, -80.0, 2113929216.0);
              drawRect(-50.0 + healthPercent, -55.0, -50.0, -57.0, color);
          }
          function drawHealthBar2(entity, posX, posY, posZ) {
              var scale = 0.09 + mc.thePlayer.getDistance(entity.posX, entity.posY, entity.posZ) / 10000.0;
              var displayName = entity.getDisplayName().getFormattedText();
      
              GL11.glPushMatrix();
              GL11.glTranslatef(posX, posY, posZ);
              GL11.glNormal3f(0.0, 1.0, 0.0);
      
              GlStateManager.rotate(-mc.thePlayer.rotationYaw, 0.0, 1.0, 0.0);
      
              GL11.glScalef(-scale, -scale, scale);
              GL11.glDisable(2896.0);
              GL11.glDisable(2929.0);
      
              GL11.glEnable(3042.0);
              GL11.glBlendFunc(770.0, 771.0);
              GL11.glScaled(0.5, 0.5, 0.5);
              
              drawHealthBar(entity);
      
              GL11.glScaled(0.9, 0.9, 0.9);
              mc.fontRendererObj.drawStringWithShadow(displayName, -50.0, -83.0, 4294967295.0);
              GL11.glScaled(0.7,0.7,0.7);
      
              mc.fontRendererObj.drawStringWithShadow('Health:' + parseInt(entity.getHealth()), -70.5, -102.0, 4294967295.0);
      
              GL11.glDisable(3042.0);
              GL11.glEnable(2929.0);
              GL11.glEnable(2896.0);
              GL11.glColor4f(1.0,1.0,1.0,1.0);
              GL11.glPopMatrix();
          }
          this.getName = function() {
              return 'NewNameTags';
          };
          this.getDescription = function() {
              return 'Renders a healthbar (deobf by Shurpe)';
          };
          this.getCategory = function() {
              return 'Fun';
          };
          var Invisible = value.createBoolean('Invisible', true);
          this.addValues = function(values) {
              values.add(Invisible);
          };
          this.onRender3D = function() {
              for(var entity in mc.theWorld.loadedEntityList) {
                  var curEntity = mc.theWorld.loadedEntityList[entity];
                  if(curEntity instanceof EntityPlayer && curEntity != mc.thePlayer && (Invisible.get() || !curEntity.isInvisible())) {
                      drawHealthBar2(curEntity, get3DPosX(curEntity), get3DPosY(curEntity), get3DPosZ(curEntity));
                  }
              }
          };
      }
      function toPercent(min, max){
          return Math.round((min / max) * 10000.0) / 100.0;
      }
      function healthColor(a5, a6) {
          var a7 = {};
          a7['wVKaA'] = function(ag, ah) {
              return ag * ah;
          };
          a7['YatuT'] = function(ai, aj) {
              return ai * aj;
          };
          a7['lwJtX'] = function(ak, al) {
              return ak - al;
          };
          if ((a5 > a6 / 2.0)) {
              var ao = parseInt((a6 - a5) * (255.0 / a6) * 2.0);
              ao = (0 + ao.toString(16.0)).slice(-2.0);
          } else {
              var ao = 255.0;
              ao = (0 + ao.toString(16.0)).slice(-2.0);
          }
          if (a5 < a6 / 2.0) {
              var aq = 255.0 - parseInt(a7['wVKaA'](a7['YatuT'](a7['lwJtX'](a6 / 2.0, a5), 255.0 / a6), 2.0)); // i cant deobf
      
              aq = (0 + aq.toString(16.0)).slice(-2.0);
          } else {
              var aq = 255.0;
              aq = (0 + aq.toString(16.0)).slice(-2.0);
          }
          return (ao + aq) + '00';
      }
      
      function get3DPosX(entity) {
          var entityPosX = entity.lastTickPosX + (entity.posX - entity.lastTickPosX) * mc.timer.renderPartialTicks - mc.getRenderManager().renderPosX;
          return entityPosX;
      }
      function get3DPosY(entity) {
          var entityPosY = entity.lastTickPosY + (entity.posY - entity.lastTickPosY) * mc.timer.renderPartialTicks - mc.getRenderManager().renderPosY;
          return entityPosY;
      }
      function get3DPosZ(entity) {
          var entityPosZ = entity.lastTickPosZ + (entity.posZ - entity.lastTickPosZ) * mc.timer.renderPartialTicks - mc.getRenderManager().renderPosZ;
          return entityPosZ;
      }
      var sHealth = new SHealth();
      var SHealthClient;
      function onEnable() {
          SHealthClient = moduleManager.registerModule(sHealth);
      }
      function onDisable() {
          moduleManager.unregisterModule(SHealthClient);
      }
      
      ? O 2 Replies Last reply Reply Quote 0
      • ?
        A Former User @DreamWasFucked last edited by

        @skidma Nice work, comrade.

        1 Reply Last reply Reply Quote 0
        • qwq Liulihaocai
          qwq Liulihaocai last edited by

          @skidma said in NameTags deobf (not 100%):

          function healthColor(health, maxHealth) {
              var colorPart1,colorPart2;
              if ((health > maxHealth / 2.0)) {
                  colorPart1 = parseInt((maxHealth - health) * (255.0 / maxHealth) * 2.0).toString(16);
              } else {
                  colorPart1 = 'ff';
              }
              if (health < maxHealth / 2.0) {
                  colorPart2 = (255.0 - parseInt(((maxHealth / 2.0 - health) * (255.0 / maxHealth)) * 2.0)).toString(16);
              } else {
                  colorPart2 = 'ff';
              }
              return (colorPart1 + colorPart2) + '00';
          }
          
          1 Reply Last reply Reply Quote 0
          • O
            ohno @DreamWasFucked last edited by

            @skidma tf it is fully deobfuscated on old forum afaik

            Official Sigmemer 1 Reply Last reply Reply Quote 0
            • Official Sigmemer
              Official Sigmemer @ohno last edited by

              @ohno link?

              O 1 Reply Last reply Reply Quote 0
              • O
                ohno @Official Sigmemer last edited by

                @official-sigmemer link

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post
                About
                • Terms of Service
                • Privacy Policy
                • Status
                • Contact Us
                Downloads
                • Releases
                • Source code
                • License
                Docs
                • Tutorials
                • CustomHUD
                • AutoSettings
                • ScriptAPI
                Community
                • Forum
                • Guilded
                • YouTube
                • Twitter
                • D.Tube