AutoEZ module

AutoEZ: Minecraft 26.3 cheat module, full source for every implementation (1 client: MelaHack (ThunderHack fork)).

1 implementationMISC

Clients with this module

Full module source: 1 implementation

Every implementation below is the complete module file, verbatim. Expand a client to read its code.

MelaHack (ThunderHack fork)MISCsrc/main/java/thunder/hack/features/modules/misc/AutoEZ.javaJava · 161 lines · 6.3 KB

Sends EZ in the chat after killing targeted players.

SettingsglobalModeServer
AutoEZ.javaJava · Minecraft 26.2 · 161 lines · 6.3 KB · complete file, verbatimOriginal ↗
1
package thunder.hack.features.modules.misc;
2
3
import meteordevelopment.orbit.EventHandler;
4
import net.minecraft.network.protocol.game.ClientboundSystemChatPacket;
5
import thunder.hack.events.impl.EventDeath;
6
import thunder.hack.events.impl.PacketEvent;
7
import thunder.hack.features.modules.Module;
8
import thunder.hack.features.modules.combat.Aura;
9
import thunder.hack.features.modules.combat.AutoCrystal;
10
import thunder.hack.setting.Setting;
11
import thunder.hack.utility.ThunderUtility;
12
13
import java.io.*;
14
import java.nio.charset.StandardCharsets;
15
import java.util.ArrayList;
16
import java.util.Objects;
17
import java.util.Random;
18
19
import static thunder.hack.features.modules.client.ClientSettings.isRu;
20
21
public final class AutoEZ extends Module {
22
    public static ArrayList<String> EZWORDS = new ArrayList<>();
23
    public Setting<Boolean> global = new Setting<>("global", true);
24
25
    String[] EZ = new String[]{
26
            "%player% АНБРЕЙН ГЕТАЙ ТХ РЕКОД",
27
            "%player% ТВОЯ МАТЬ БУДЕТ СЛЕДУЮЩЕЙ))))",
28
            "%player% БИЧАРА БЕЗ ТХ",
29
            "%player% ЧЕ ТАК БЫСТРО СЛИЛСЯ ТО А?",
30
            "%player% ПЛАЧЬ",
31
            "%player% УПССС ЗАБЫЛ КИЛЛКУ ВЫРУБИТЬ",
32
            "ОДНОКЛЕТОЧНЫЙ %player% БЫЛ ВПЕНЕН",
33
            "%player% ИЗИ БЛЯТЬ АХААХАХАХАХААХ",
34
            "%player% БОЖЕ МНЕ ТЕБЯ ЖАЛКО ВГЕТАЙ ТХ",
35
            "%player% ОПРАВДЫВАЙСЯ В ХУЙ ЧЕ СДОХ ТО)))",
36
            "%player% СПС ЗА ОТСОС)))"
37
    };
38
39
    private final Setting<ModeEn> mode = new Setting<>("Mode", ModeEn.Basic);
40
    private final Setting<ServerMode> server = new Setting<>("Server", ServerMode.Universal);
41
42
    public AutoEZ() {
43
        super("AutoEZ", Category.MISC);
44
        loadEZ();
45
    }
46
47
    public static void loadEZ() {
48
        try {
49
            File file = new File("ThunderHackRecode/misc/AutoEZ.txt");
50
            if (!file.exists()) file.createNewFile();
51
            new Thread(() -> {
52
                try {
53
                    FileInputStream fis = new FileInputStream(file);
54
                    InputStreamReader isr = new InputStreamReader(fis, StandardCharsets.UTF_8);
55
                    BufferedReader reader = new BufferedReader(isr);
56
                    ArrayList<String> lines = new ArrayList<>();
57
                    String line;
58
                    while ((line = reader.readLine()) != null) {
59
                        lines.add(line);
60
                    }
61
                    boolean newline = false;
62
                    for (String l : lines) {
63
                        if (l.isEmpty()) {
64
                            newline = true;
65
                            break;
66
                        }
67
                    }
68
                    EZWORDS.clear();
69
                    ArrayList<String> spamList = new ArrayList<>();
70
                    if (newline) {
71
                        StringBuilder spamChunk = new StringBuilder();
72
                        for (String l : lines) {
73
                            if (l.isEmpty()) {
74
                                if (!spamChunk.isEmpty()) {
75
                                    spamList.add(spamChunk.toString());
76
                                    spamChunk = new StringBuilder();
77
                                }
78
                            } else spamChunk.append(l).append(" ");
79
                        }
80
                        spamList.add(spamChunk.toString());
81
                    } else spamList.addAll(lines);
82
83
                    EZWORDS = spamList;
84
                } catch (Exception ignored) {
85
                }
86
            }).start();
87
        } catch (IOException ignored) {
88
        }
89
    }
90
91
    @Override
92
    public void onEnable() {
93
        loadEZ();
94
    }
95
96
    @EventHandler
97
    public void onPacketReceive(PacketEvent.Receive e) {
98
        if (fullNullCheck()) return;
99
        if (server.getValue() == ServerMode.Universal) return;
100
        if (e.getPacket() instanceof ClientboundSystemChatPacket) {
101
            final ClientboundSystemChatPacket packet = e.getPacket();
102
            if (packet.content().getString().contains("Вы убили игрока")) {
103
                String name = ThunderUtility.solveName(packet.content().getString());
104
                if (Objects.equals(name, "FATAL ERROR")) return;
105
106
                String finalword;
107
                if (mode.getValue() == ModeEn.Basic) {
108
                    int n;
109
                    n = (int) Math.floor(Math.random() * EZ.length);
110
                    finalword = EZ[n].replace("%player%", name);
111
                } else {
112
                    if (EZWORDS.isEmpty()) {
113
                        sendMessage(isRu() ? "Файл с AutoEZ пустой!" : "AutoEZ.txt is empty!");
114
                        return;
115
                    }
116
                    finalword = EZWORDS.get(new Random().nextInt(EZWORDS.size()));
117
                    finalword = finalword.replaceAll("%player%", name);
118
                }
119
                mc.player.connection.sendChat(global.getValue() ? "!" + finalword : finalword);
120
            }
121
        }
122
    }
123
124
    @EventHandler
125
    public void onDeath(EventDeath e) {
126
        if (server.getValue() != ServerMode.Universal) return;
127
        if (Aura.target != null && Aura.target == e.getPlayer()) {
128
            sayEZ(e.getPlayer().getName().getString());
129
            return;
130
        }
131
        if (AutoCrystal.target != null && AutoCrystal.target == e.getPlayer())
132
            sayEZ(e.getPlayer().getName().getString());
133
    }
134
135
    public void sayEZ(String pn) {
136
        String finalword;
137
        if (mode.getValue() == ModeEn.Basic) {
138
            int n;
139
            n = (int) Math.floor(Math.random() * EZ.length);
140
            finalword = EZ[n].replace("%player%", pn);
141
        } else {
142
            if (EZWORDS.isEmpty()) {
143
                sendMessage(isRu() ? "Файл с AutoEZ пустой!" : "AutoEZ.txt is empty!");
144
                return;
145
            }
146
            finalword = EZWORDS.get(new Random().nextInt(EZWORDS.size()));
147
            finalword = finalword.replaceAll("%player%", pn);
148
        }
149
        mc.player.connection.sendChat(global.getValue() ? "!" + finalword : finalword);
150
    }
151
152
    public enum ModeEn {
153
        Custom,
154
        Basic
155
    }
156
157
    public enum ServerMode {
158
        Universal,
159
        FunnyGame
160
    }
161
}