Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse

LiquidBounce Forum

  1. Home
  2. Scripts
  3. NameTags deobf (not 100%)

NameTags deobf (not 100%)

Scheduled Pinned Locked Moved Scripts
6 Posts 5 Posters 696 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • DreamWasFuckedD Offline
    DreamWasFuckedD Offline
    DreamWasFucked
    wrote on last edited by DreamWasFucked
    #1

    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
    0
    • ? Offline
      ? Offline
      A Former User
      replied to DreamWasFucked on last edited by
      #2

      @skidma Nice work, comrade.

      1 Reply Last reply
      0
      • qwq LiulihaocaiQ Offline
        qwq LiulihaocaiQ Offline
        qwq Liulihaocai
        wrote on last edited by
        #3

        @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
        0
        • O Offline
          O Offline
          ohno
          replied to DreamWasFucked on last edited by
          #4

          @skidma tf it is fully deobfuscated on old forum afaik

          Official SigmemerO 1 Reply Last reply
          0
          • Official SigmemerO Offline
            Official SigmemerO Offline
            Official Sigmemer
            replied to ohno on last edited by
            #5

            @ohno link?

            O 1 Reply Last reply
            0
            • O Offline
              O Offline
              ohno
              replied to Official Sigmemer on last edited by
              #6

              @official-sigmemer link

              1 Reply Last reply
              0

              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
              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups