[Script] AutoLogin 1.0



  • Name: AutoLogin
    Introduction: If you don't want to use the keyboard to enter the password, please use this! Maybe it can help you.

    Legacy Support:

    var scriptName = "AutoLogin";
    var scriptAuthor = "ButterChicken";
    var scriptVersion = 1.0;
    
    var S02PacketChat = Java.type("net.minecraft.network.play.server.S02PacketChat");
    var prefix;
    
    function ExampleModule() {
    	var chatMode = value.createList("Chat", ["/", "."], "/");
    	var logintext = value.createText("LoginText", "login");
    	var regtext = value.createText("RegisterText", "reg");
    	var Password = value.createText("Password", "123456789abc");
        this.getName = function() {
            return "AutoLogin";
        }
        this.getDescription = function() {
            return "Good luck.";
        }
        this.getCategory = function() {
            return "Misc"; // Combat, Exploit, Fun, Misc, Movement, Player, Render, World
        }
    	this.addValues = function(values) {
    		values.add(chatMode);
    		values.add(logintext);
    		values.add(regtext);
    		values.add(Password);
    	}
    	this.onPacket = function(event) {
    		var packet = event.getPacket();
    		if(packet instanceof S02PacketChat) {
    			if(packet.getChatComponent().getUnformattedText().contains(regtext.get())) {
    				if(chatMode.get() == "/") {
    					prefix = "/";
    				}else {
    					prefix = ".";
    				}
    				mc.thePlayer.sendChatMessage(prefix + "register " + Password.get() + " " + Password.get());
    			}
    			if(packet.getChatComponent().getUnformattedText().contains(logintext.get())) {
    				if(chatMode.get() == "/") {
    					prefix = "/";
    				}else {
    					prefix = ".";
    				}
    				mc.thePlayer.sendChatMessage(prefix + "login " + Password.get());
    			}
    		}
    	}
    }
    var exampleModule = new ExampleModule();
    var exampleModuleClient;
    
    function onLoad() {}
    
    function onEnable() {
        exampleModuleClient = moduleManager.registerModule(exampleModule);
    }
    
    function onDisable() {
        moduleManager.unregisterModule(exampleModuleClient);
    }
    

    New Script-API Support:

    /// api_version=2
    var script = registerScript({
        name: "AutoLogin",
        version: "1.0",
        authors: ["ButterChicken"]
    });
    
    var S02PacketChat = Java.type("net.minecraft.network.play.server.S02PacketChat");
    var prefix;
    
    script.on("enable", function () {});
    
    script.on("disable", function () {});
    
    script.on("load", function () {});
    
    script.registerModule({
        name: "AutoLogin",
        description: "Good luck.",
        category: "Misc",
        tag: "",
        settings: {
    	chatMode: Setting.list({
                name: "chatMode",
                values: ["/", "."],
                default: "/"
            })
    	Password: Setting.text({
                name: "Password",
                default: "123456789abc"
            }),
    	logintext: Setting.text({
                name: "LoginText",
                default: "login"
            }),
    	regtext: Setting.text({
                name: "RegisterText",
                default: "reg"
            }),
    }
    }, function (module) {
        module.on("enable", function () {
    
        });
        module.on("disable", function () {
    
        });
        module.on("packet", function () {
    		var packet = event.getPacket();
    		if(packet instanceof S02PacketChat) {
    			if(packet.getChatComponent().getUnformattedText().contains(regtext.get())) {
    				if(chatMode.get() == "/") {
    					prefix = "/";
    				}else {
    					prefix = ".";
    				}
    				mc.thePlayer.sendChatMessage(prefix + "register " + Password.get() + " " + Password.get());
    			}
    			if(packet.getChatComponent().getUnformattedText().contains(logintext.get())) {
    				if(chatMode.get() == "/") {
    					prefix = "/";
    				}else {
    					prefix = ".";
    				}
    				mc.thePlayer.sendChatMessage(prefix + "login " + Password.get());
    			}
    		}
    	});
    });
    


  • scorpion already made one, easier to use, but not work on all sv



  • 			if(chatMode.get() == "/") {
    				prefix = "/";
    			}else {
    				prefix = ".";
    			}
    

    bruh

    Here is an AutoLogin using Core

    module = {
        name: "AutoLogin",
        author: "CzechHek",
        values: password = value.createText("Password", "idkwhattowrite"),
        onPacket: function (e) {
            e.getPacket() instanceof S02PacketChat && ((msg = e.getPacket().getChatComponent().getUnformattedText()).contains("register") ? mc.thePlayer.sendChatMessage("/register " + password.get() + " " + password.get()) : msg.contains("login") && mc.thePlayer.sendChatMessage("/login " + password.get()));
        }
    }
    
    script.import("Core.lib");
    


  • @CzechHek said in [Script] AutoLogin 1.0:

    Here is an AutoLogin using Core

    stop flexing your oneliner abilities QAQ



  • @Aftery lol





  • CookieChinese has already made it bro, her script's name is AutoMessage


Log in to reply