ItemTeleport/TeleportHit Scripting help thing thingy pls help me pls.

Avatar

By Sms_Gamer_3808 20 March 2019 17:37

Member · 427 comments

I can't figure out how to make it work/bypass in a script. ItemTeleport/TeleportHit bypasses, but not the script. Could you pls help me (if I'm even doing it correctly)?

var scriptName = "AACFly";
var scriptAuthor = "Shoghi Gaming";
var scriptVersion = 1.0;

 // Converts from degrees to radians.
 Math.radians = function(degrees) {
    return degrees * Math.PI / 180;
  };
   
  // Converts from radians to degrees.
  Math.degrees = function(radians) {
    return radians * 180 / Math.PI;
  };

function vClip(offset) {
    mc.thePlayer.setPosition(mc.thePlayer.posX, mc.thePlayer.posY + offset, mc.thePlayer.posZ);
}

function hClip(offset) {
    var playerYaw = Math.radians(mc.thePlayer.rotationYaw);
    mc.thePlayer.setPosition(mc.thePlayer.posX - (Math.sin(playerYaw) * offset), mc.thePlayer.posY, mc.thePlayer.posZ + (Math.cos(playerYaw) * offset));
}

var client;

function FlyModule() {
  var ticks6 = 0;
    this.getName = function() {
        return "AACFly";
    }

    this.getDescription = function() {
        return "Fly AAC Insurance"
    }

    this.getCategory = function() {
        return "Movement";
    }

    this.onEnable = function() {
    }

    this.onUpdate = function() {
        ticks6++
        if (ticks6 == 4) {
          ticks6 = 0;
        }
        if (mc.gameSettings.keyBindJump.isKeyDown() && (ticks6 == 0)) {
          vClip(3)
        }
        if (mc.gameSettings.keyBindJump.isKeyDown() && (ticks6 == 1)) {
        vClip(-3)  
        }
    }

    this.onMotion = function() {
    }

    this.onDisable = function() {
    }
}

var flyModule = new FlyModule();
var flyModuleClient;

function onEnable() {
    flyModuleClient = moduleManager.registerModule(flyModule);
}

function onDisable() {
    moduleManager.unregisterModule(flyModuleClient);
}

Last edited by Sms_Gamer_3808 (20 March 2019 17:39)


ਗਨੋਮ ਲਵੋ

Avatar

By Sms_Gamer_3808 20 March 2019 17:38

Member · 427 comments

I mean like it's teleporting up then back down, but not instantly like ItemTeleport/TeleportHit does.


ਗਨੋਮ ਲਵੋ

Avatar

By Sms_Gamer_3808 21 March 2019 15:32

Member · 427 comments

I do need to know if that's ok.


ਗਨੋਮ ਲਵੋ

Avatar

By Shiv3R 21 March 2019 15:57

Member · 146 comments

use mc.thePlayer.setPositionAndUpdate no mc.thePlayer.setPosition

Last edited by Shiv3R (21 March 2019 15:57)

Avatar

By Sms_Gamer_3808 21 March 2019 22:07

Member · 427 comments
Shiv3R wrote

use mc.thePlayer.setPositionAndUpdate no mc.thePlayer.setPosition

I'll try. Thanks. axocute


ਗਨੋਮ ਲਵੋ