[JS]Did some fun JS recently
-
InstantPortal
if(mc.thePlayer.timeInPortal > 0) { for(var i = 0; i < 15; i++) { mc.thePlayer.sendQueue.addToSendQueue(new C03PacketPlayer(true)); } }
AsFlyPro B73Fixed
var script = registerScript({ name: "AsFlyPro", version: "2.4", authors: ["As丶One"] }); var LiquidBounce = Java.type("net.ccbluex.liquidbounce.LiquidBounce") var MovementUtils = Java.type("net.ccbluex.liquidbounce.utils.MovementUtils") var Cross = CheckCross(); var classProvider = Cross[0]; var packets = [] var doAsFly = false var doClipY = false var stage = 0 var maxStage = 5 var jump = false var timer = 0 var MotionCheck = 0 var C0APacketAnimation = Java.type('net.minecraft.network.play.client.C0APacketAnimation'); var C0BPacketEntityAction = Java.type('net.minecraft.network.play.client.C0BPacketEntityAction'); var C02PacketUseEntity = Java.type('net.minecraft.network.play.client.C02PacketUseEntity'); var C03PacketPlayer = Java.type('net.minecraft.network.play.client.C03PacketPlayer'); var C05PacketPlayerLook = Java.type('net.minecraft.network.play.client.C03PacketPlayer.C05PacketPlayerLook'); var C04PacketPlayerPosition = Java.type('net.minecraft.network.play.client.C03PacketPlayer.C04PacketPlayerPosition'); var C06PlayerPacketPosLook = Java.type('net.minecraft.network.play.client.C03PacketPlayer.C06PacketPlayerPosLook'); var C08PacketPlayerBlockPlacement = Java.type('net.minecraft.network.play.client.C08PacketPlayerBlockPlacement'); var S08PacketPlayerPosLook = Java.type('net.minecraft.network.play.server.S08PacketPlayerPosLook'); var S40PacketDisconnect = Java.type('net.minecraft.network.play.server.S40PacketDisconnect'); // By-mumy function CheckCross() { var classProvider, Version, Cross = true; try { classProvider = LiquidBounce.INSTANCE.getWrapper().getClassProvider(); Version = Java.type("net.ccbluex.liquidbounce.injection.backend.Backend").MINECRAFT_VERSION; } catch (err) { classProvider = { isCPacketAnimation: function (packet) { return packet instanceof C0APacketAnimation; }, isCPacketEntityAction: function (packet) { return packet instanceof C0BPacketEntityAction; }, isCPacketUseEntity: function (packet) { return packet instanceof C02PacketUseEntity; }, isCPacketPlayer: function (packet) { return packet instanceof C03PacketPlayer; }, isCPacketPlayerPosition:function (packet) { return packet instanceof C04PacketPlayerPosition; }, isCPacketPlayerPosLook: function (packet) { return packet instanceof C05PacketPlayerLook; }, isCPacketPlayerBlockPlacement: function (packet) { return packet instanceof C08PacketPlayerBlockPlacement; }, isSPacketPlayerPosLook: function (packet) { return packet instanceof S08PacketPlayerPosLook; } } Cross = false; Version = '1.8.9'; } finally { return [classProvider, Cross, Version]; } }; var Mode = Setting.list({ name: "HytMode", values: ["Custom", "Fast", "Fast2", "OldRedesky", "Clip", "OldHmxixFast", "Slow", "Test", "4v4test", "OldHmxixInf", "OldHmxixGlide"], default: "Custom" }) var ServerMode = Setting.list({ name: "ServerMode", values: ["Blink", "Normal", "C03"], default: "Blink" }) var YMode = Setting.list({ name: "YMode", values: ["MotionY", "Clip"], default: "MotionY" }) var ThirdPersonView = Setting.list({ name: "ThirdPersonView", values: ["One", "Two", "Three", "Off"], default: "Two" }) var motionY = Setting.float({ name: "MotionY", default: 1.8, min: 0.42, max: 6 }) var ClipY = Setting.integer({ name: "ClipY", default: 5, min: 2, max: 30 }) var ClipH = Setting.integer({ name: "ClipH", default: 5, min: 2, max: 30 }) var motionXZ = Setting.float({ name: "MotionXZ", default: 2.5, min: 0, max: 10 }) var Bob = Setting.float({ name: "Bob", default: 0.5, min: 0, max: 2 }) var delay = Setting.integer({ name: "Delay", default: 2, min: 0, max: 10 }) var Clipdelay = Setting.integer({ name: "Clipdelay", default: 1, min: 0, max: 10 }) var HmxixTimer = Setting.integer({ name: "HmxixTimer", default: 6, min: 1, max: 10 }) var BindSlowSpeed = Setting.integer({ name: "BindSlowSpeed", default: 7, min: 1, max: 10 }) var DownY = Setting.float({ name: "DownY", default: 1.25, min: 0.42, max: 2 }) var AntiLagDelay = Setting.float({ name: "AntiLagDelay", default: 2, min: 1, max: 6 }) var NormalDownY = Setting.float({ name: "NormalDownY", default: 0.05, min: 0.01, max: 2 }) var y = 0 var Delay = 0 function move() { Delay++ mc.thePlayer.cameraYaw = Bob.get() if (Mode.get() == "Custom") { if (mc.thePlayer.posY <= y && mc.gameSettings.keyBindSneak.isKeyDown() == false) { MotionCheck = MotionCheck - 1 if (YMode.get() == "MotionY") { mc.thePlayer.motionY = motionY.get() } if (YMode.get() == "Clip") { Clipy(ClipY.get()); } if (MotionCheck > 0 || MotionCheck < 0) { chat.print("§e[§cAsFly§e]§bMotionCheck:" + MotionCheck) } else { chat.print("§e[§cAsFly§e]§bMotionCheck:" + MotionCheck + " " + "Next MotionY you will be Kicked") } } else { if (mc.gameSettings.keyBindForward.isKeyDown()) { var dir = mc.thePlayer.rotationYaw / 180 * Math.PI if (mc.thePlayer.motionY < 0 && mc.gameSettings.keyBindSneak.isKeyDown() == false) mc.thePlayer.motionY = 0 - NormalDownY.get() if (mc.thePlayer.motionY < 0 && mc.gameSettings.keyBindSneak.isKeyDown() == true) mc.thePlayer.motionY = 0 - DownY.get() mc.thePlayer.motionX = -Math.sin(dir) * motionXZ.get() mc.thePlayer.motionZ = Math.cos(dir) * motionXZ.get() } else { if (mc.thePlayer.motionY < 0 && mc.gameSettings.keyBindSneak.isKeyDown() == false) mc.thePlayer.motionY = 0 - NormalDownY.get() if (mc.thePlayer.motionY < 0 && mc.gameSettings.keyBindSneak.isKeyDown() == true) mc.thePlayer.motionY = 0 - DownY.get() } } } if (Mode.get() == "Fast") { if (mc.thePlayer.posY <= y) { mc.thePlayer.motionY = 0.42 } var dir = mc.thePlayer.rotationYaw / 180 * Math.PI if (mc.thePlayer.motionY < 0) mc.thePlayer.motionY = 0 - NormalDownY.get() mc.thePlayer.motionX = -Math.sin(dir) * 0.8 mc.thePlayer.motionZ = Math.cos(dir) * 0.8 } if (Mode.get() == "Test") { if (mc.thePlayer.posY <= y && mc.gameSettings.keyBindSneak.isKeyDown() == false) { if(MotionCheck > 0){ MotionCheck = MotionCheck - 1 } if (YMode.get() == "MotionY") { mc.thePlayer.motionY = motionY.get() } if (YMode.get() == "Clip") { Clipy(ClipY.get()); } if (MotionCheck > 0 || MotionCheck < 0) { chat.print("§e[§cAsFly§e]§bMotionY") } else { chat.print("§e[§cAsFly§e]§bMotionY Last Test") } } } if (Mode.get() == "Fast2") { if (mc.thePlayer.posY <= y) { mc.thePlayer.motionY = 0.62 } var dir = mc.thePlayer.rotationYaw / 180 * Math.PI if (mc.thePlayer.motionY < 0) mc.thePlayer.motionY = 0 - NormalDownY.get() mc.thePlayer.motionX = -Math.sin(dir) * 0.61 mc.thePlayer.motionZ = Math.cos(dir) * 0.61 } if (Mode.get() == "Oldredesky") { if (mc.thePlayer.posY <= y) { mc.thePlayer.motionY = 0.42 } var dir = mc.thePlayer.rotationYaw / 180 * Math.PI if (mc.thePlayer.motionY < 0) mc.thePlayer.motionY = 0 - NormalDownY.get() mc.thePlayer.motionX = -Math.sin(dir) * 0.4 mc.thePlayer.motionZ = Math.cos(dir) * 0.4 } if (Mode.get() == "HmxixInf") { var dir = mc.thePlayer.rotationYaw / 180 * Math.PI if (mc.thePlayer.motionY < 0) mc.thePlayer.motionY = 0 - NormalDownY.get() mc.thePlayer.motionX = -Math.sin(dir) * 0.4 mc.thePlayer.motionZ = Math.cos(dir) * 0.4 } if (Mode.get() == "Slow") { if (mc.thePlayer.posY <= y) { mc.thePlayer.motionY = 0.42 } var dir = mc.thePlayer.rotationYaw / 180 * Math.PI if (mc.thePlayer.motionY < 0) mc.thePlayer.motionY = 0 - NormalDownY.get() mc.thePlayer.motionX = -Math.sin(dir) * 0.41 mc.thePlayer.motionZ = Math.cos(dir) * 0.41 } if (Mode.get() == "Clip") { mc.thePlayer.motionY = 0 if (mc.thePlayer.posY <= y) { Clipy(Clipy.get()); } if(Delay > Clipdelay.get()){ hClip(ClipH.get()); Delay = 0 } } if (Mode.get() == "HmxixGlide") { if (mc.thePlayer.posY <= y) { Clipy(5); } if(Delay > Clipdelay.get()){ hClip(5); Clipy(Clipy.get()); Delay = 0 } } } script.registerModule({ name: "AsFlyPro", description: "AsFlyPro By As丶One", category: "Fun", settings: { Mode: Mode, YMode: YMode, ServerMode: ServerMode, ThirdPersonView: ThirdPersonView, motionY: motionY, ClipY: ClipY, Clipdelay: Clipdelay, ClipH: ClipH, motionXZ: motionXZ, HmxixTimer: HmxixTimer, delay: delay, BindSlowSpeed: BindSlowSpeed, AntiLagDelay: AntiLagDelay, DownY: DownY, NormalDownY: NormalDownY, Bob: Bob } }, function (module) { var File = Java.type("java.io.File"); var FileReader = Java.type("java.io.FileReader"); var BufferedReader = Java.type("java.io.BufferedReader"); var LiquidBounce = Java.type("net.ccbluex.liquidbounce.LiquidBounce") var FileManager = LiquidBounce.fileManager var sendPacket; function readFile(filePath) { var file = new File(filePath); var reader = new BufferedReader(new FileReader(file)); var content = ""; var line; while ((line = reader.readLine()) !== null) content += line return content; } //chat.print(FileManager.hudConfig) //chat.print(Java.from(FileManager.class.getDeclaredFields())) var image = "IamgeCheck" var hudConfig = eval(readFile(FileManager.hudConfig.getFile())) var flag = true for (var i in hudConfig) { if (hudConfig[i].Type == "Image" && hudConfig[i].Image == image) flag = false } //if (flag) chat.print(FileManager.hudConfig + " " + "AsoneHwidCheck:CookieConfig") //if (flag) return; module.on("enable", function () { y = mc.thePlayer.posY timer = 999 MotionCheck = 4 //chat.print("§e[§cAsFly§e]§bStartMotionY:" + motionY.get()) //chat.print(FileManager.hudConfig + " " + "AsoneHwidCheck:CookieConfig") }); module.on("disable", function () { mc.gameSettings.thirdPersonView = 0; mc.timer.timerSpeed = 1; MotionCheck = 0 Delay = 0 packets.forEach(function () { sendPacket(packets.shift()) }) }); module.on("update", function () { if (ThirdPersonView.get() == "One") { mc.gameSettings.thirdPersonView = 0 } if (Mode.get() == "HmxixFast") { mc.thePlayer.motionY = 0 mc.timer.timerSpeed = HmxixTimer.get(); } if (Mode.get() == "HmxixInf") { mc.thePlayer.motionY = 0 mc.timer.timerSpeed = HmxixTimer.get(); } if (Mode.get() == "ClipGlide") { if(Delay < Clipdelay.get()){ mc.thePlayer.motionY = 0 mc.thePlayer.motionZ = 0 mc.thePlayer.motionX = 0 } } if (Mode.get() == "Test") { mc.thePlayer.motionZ = 0 mc.thePlayer.motionX = 0 } if (ThirdPersonView.get() == "Two") { mc.gameSettings.thirdPersonView = 1 } if (ThirdPersonView.get() == "Three") { mc.gameSettings.thirdPersonView = 2 } if (!doAsFly) timer++ if (timer > delay.get()) { timer = 0 doAsFly = true stage = 0 move() } if (mc.gameSettings.keyBindJump.isKeyDown()) { mc.timer.timerSpeed = BindSlowSpeed.get() / 10 } else { if (!Mode.get() == "HmxixFast") { mc.timer.timerSpeed = 1; } } if (stage >= 1) { doAsFly = false packets.forEach(function () { sendPacket(packets.shift()) }) } }); module.on("packet", function (event) { if (Mode.get() == "HmxixFast") { mc.thePlayer.motionY = 0 if(Delay > Clipdelay.get()){ hClip(ClipH.get()); Delay = 0 } } if(ServerMode.get() == "Blink"){ if (!doAsFly) return var packet = event.packet if (classProvider.isCPacketPlayer(packet)) event.cancelEvent() if (classProvider.isCPacketPlayerPosition(packet) || classProvider.isCPacketPlayerPosLook(packet) || classProvider.isCPacketPlayerBlockPlacement(packet) || classProvider.isCPacketAnimation(packet) || classProvider.isCPacketEntityAction(packet) || classProvider.isCPacketUseEntity(packet)) { event.cancelEvent() packets.push(packet) stage++ } } if(ServerMode.get() == "Normal"){ stage++ } }); }); //by Baguette Fly function Clipy(d) { mc.thePlayer.setPosition(mc.thePlayer.posX, mc.thePlayer.posY + d, mc.thePlayer.posZ); } function hClip(d) { var playerYaw = Math.radians(mc.thePlayer.rotationYaw); mc.thePlayer.setPosition(mc.thePlayer.posX + d * -Math.sin(playerYaw), mc.thePlayer.posY, mc.thePlayer.posZ + d * Math.cos(playerYaw)); } Math.radians = function(degrees) { return degrees * Math.PI / 180; };
PlayerMessage
var scriptName = "Test"; var scriptAuthor = "As丶One"; var scriptVersion = 1.0; function Test() { var OldPlayerList = [] function getPlayerList(){ var PlayerInfoMap = mc.getNetHandler().getPlayerInfoMap().toArray() var Array = [] for(var i in PlayerInfoMap){ Array.push(PlayerInfoMap[i].getGameProfile().getName()) } return Array } this.getName = function() { return "Test" } this.getDescription = function() { return "Test By As丶One" } this.getCategory = function() { return "Fun" } this.onEnable = function() { OldPlayerList = getPlayerList() } this.onUpdate = function(){ if(mc.thePlayer.ticksExisted != 0){ for(var i in getPlayerList()){ if(OldPlayerList.indexOf(getPlayerList()[i]) == -1 ){ chat.print("§d[§fAs丶One§d]§a" + getPlayerList()[i] + ' has just joined the game') } } } OldPlayerList = getPlayerList() } } var Test = new Test(); var TestClient; function onEnable() { TestClient = moduleManager.registerModule(Test) }; function onDisable() { moduleManager.unregisterModule(TestClient) };
-
@cookiechinese 很好的js但是为什么不回我b站