for i in range(0, 128):
ent_addr = pm.r_int64(gmod_exe, client_dll["base"] + Offsets.EntityList + i * 0x20)
if ent_addr:
ent = Entity(ent_addr, gmod_exe, client_dll["base"])
try:
if ent.name and "STEAM_" in ent.steamid:
players.append((ent.name, ent.steamid))
except:
pass
def main():
if not pm.process_exists("gmod.exe"):
ctypes.windll.user32.MessageBoxW(0, "Please make sure that gmod is open. And that you are using the Chromium x64 branch.", "Gmod x64 not found.", 48)
os._exit(0)
gmod_exe = pm.open_process("gmod.exe")
client_dll = pm.get_module(gmod_exe, "client.dll")
engine_dll = pm.get_module(gmod_exe, "engine.dll")
materialsystem_dll = pm.get_module(gmod_exe, "materialsystem.dll")
pm.overlay_init("Garry's Mod (x64)", fps=60)
holding = False
while pm.overlay_loop():
if not pm.process_running(gmod_exe):
os._exit(0)
pm.begin_drawing()
if dpg.get_value('c_hud'):
pm.draw_rectangle_rounded(5, 5, 248, 30, 0.2, 4, Colors.hud_fade)
pm.draw_rectangle_rounded_lines(5, 5, 248, 30, 0.2, 4, Colors.white, 2)
pm.draw_text(f"Nexus ESP | {pm.get_fps()} fps", 12, 11, 24, Colors.hud)
texts = []
if dpg.get_value('c_box'):
texts.append("ESP")
if dpg.get_value('c_tracer'):
texts.append("Tracer")
if dpg.get_value('c_crosshair'):
texts.append("Crosshair")
if dpg.get_value('c_bhop'):
texts.append("Bhop")
if dpg.get_value('c_triggerbot'):
if dpg.get_value('c_click_method') == "Hold":
texts.append("Triggerbot (Hold)")
else:
texts.append("Triggerbot (Tap)")
start_x = 5
start_y = 37
spacing = 27
for i, text in enumerate(texts):
y_offset = start_y + (i * spacing)
try:
local_player_addr = pm.r_int64(gmod_exe, client_dll["base"] + Offsets.LocalPlayer)
except:
continue
if local_player_addr:
view_matrix_base = pm.r_int64(gmod_exe, engine_dll["base"] + Offsets.ViewMatrix) + 0x2D4
view_matrix = pm.r_floats(gmod_exe, view_matrix_base, 16)
notif_offset = 5
for i in range(0, 128):
ent_addr = pm.r_int64(gmod_exe, client_dll["base"] + Offsets.EntityList + i * 0x20)
if ent_addr == local_player_addr:
local_id = i
if ent_addr > 0 and ent_addr != local_player_addr:
ent = Entity(ent_addr, gmod_exe, client_dll["base"])
try:
if not dpg.get_value('c_onlyplayer') or "STEAM_" in ent.steamid:
if dpg.get_value('c_spectate'):
if ent.get_spectated_player == local_id:
if not isinstance(ent.name, bytes) and ent.name:
name = f" Spectated by: {ent.name} "
text_width = pm.measure_text(name, 24)
x = pm.get_screen_width() // 2 - text_width // 2
pm.draw_rectangle_rounded(x, notif_offset, text_width, 30, 0.2, 4, Colors.hud_fade)
pm.draw_rectangle_rounded_lines(x, notif_offset, text_width, 30, 0.2, 4, Colors.white, 2)
pm.draw_text(name, x, notif_offset + 6, 24, Colors.hud)
notif_offset += 35
if not dpg.get_value('c_hidedormant') or ent.dormant != -65536:
if ent.health > 0:
try:
with open("friends.json", "r", encoding="utf-8") as f:
friends = json.load(f)
except:
friends = []
if not dpg.get_value('c_onlyfriends') or ent.steamid in friends:
if dpg.get_value('c_maxdistance') != 0:
local = Local(local_player_addr, gmod_exe, client_dll["base"])
distance = pm.vec3_distance(local.pos, ent.pos)
if int(distance / 32) > dpg.get_value('c_maxdistance') and ent.steamid not in friends:
continue
if dpg.get_value('c_entcolor') == "Unicolor":
if ent.steamid in friends:
color = dpg.get_value('c_friends_colors')
r, g, b = map(int, color[:3])
hex_color = "#{:02X}{:02X}{:02X}".format(r, g, b)
ent.color = pm.get_color(hex_color)
else:
color = dpg.get_value('c_unicolor')
r, g, b = map(int, color[:3])
hex_color = "#{:02X}{:02X}{:02X}".format(r, g, b)
ent.color = pm.get_color(hex_color)
else:
if dpg.get_value('c_entcolor') == "Visibility":
if ent.visiblity != "0xffffffff":
ent.color = Colors.red
if dpg.get_value('c_hideinvisible'):
continue
else:
if ent.noclipping != "0xff00":
ent.color = Colors.orange
if dpg.get_value('c_hidenoclipping'):
continue
else:
if ent.steamid in friends:
color = dpg.get_value('c_friends_colors')
r, g, b = map(int, color[:3])
hex_color = "#{:02X}{:02X}{:02X}".format(r, g, b)
ent.color = pm.get_color(hex_color)
else:
ent.color = Colors.green
if dpg.get_value('c_showinvisible'):
if ent.visiblity == "0xffffffff":
continue
if dpg.get_value('c_shownoclipping'):
if ent.noclipping == "0xff00":
continue
elif dpg.get_value('c_entcolor') == "Team":
color = ((ent.team * 137) % 256 , (ent.team * 53) % 256, (ent.team * 197) % 256)
r, g, b = map(int, color[:3])
hex_color = "#{:02X}{:02X}{:02X}".format(r, g, b)
ent.color = pm.get_color(hex_color)
else:
health = max(0, min(ent.health, 100))
g = int(health * 2.55)
r = 255 - g
b = 0
ent.color = pm.get_color("#{:02X}{:02X}{:02X}".format(r, g, b))
if dpg.get_value('c_esp_method') == "BonesPos (experimental)":
try:
if pm.vec3_distance(ent.pos, ent.bone_pos(7)) < 100:
local = Local(local_player_addr, gmod_exe, client_dll["base"])
dist = pm.vec3_distance(local.pos, ent.pos)
ent.wts = pm.world_to_screen(view_matrix, ent.pos, 1)
head_pos = pm.world_to_screen(view_matrix, ent.bone_pos(7), 1)
head = ent.wts["y"] - head_pos["y"]
width = head / 2
center = width / 2
text_offset = 5
if dpg.get_value('c_box'):
pm.draw_rectangle(
posX=head_pos["x"] - center,
posY=head_pos["y"] - center / 2,
width=width,
height=head + center / 2,
color=pm.fade_color(ent.color, 0.3),
)
pm.draw_rectangle_lines(
posX=head_pos["x"] - center,
posY=head_pos["y"] - center / 2,
width=width,
height=head + center / 2,
color=ent.color,
lineThick=1.8,
)
if dpg.get_value('c_skeleton'):
bones = {
'neck': 5,
'shoulderRight': 9,
'shoulderLeft': 14,
'elbowRight': 10,
'elbowLeft': 15,
'handRight': 11,
'handLeft': 16,
'crotch': 0,
'kneeRight': 19,
'kneeLeft': 23,
'ankleRight': 21,
'ankleLeft': 25,
}
screen_positions = {}
for name, index in bones.items():
bone_pos = ent.bone_pos(index)
if pm.vec3_distance(ent.pos, bone_pos) < 100:
screen_positions[name] = pm.world_to_screen(view_matrix, bone_pos, 1)
skeleton_color = ent.color
if dpg.get_value('c_box'):
skeleton_color = Colors.white
for a, b in connections:
if a in screen_positions and b in screen_positions:
p1, p2 = screen_positions[a], screen_positions
pm.draw_line(p1["x"], p1["y"], p2["x"], p2["y"], skeleton_color, 1)
if dpg.get_value('blatantcheck'):
if dpg.get_value('c_bhop'):
if win32api.GetAsyncKeyState(0x20) == 0:
continue
noclipping = hex(pm.r_int(gmod_exe, local_player_addr + 0x84))
if noclipping == "0xff00":
flag = pm.r_int(gmod_exe, local_player_addr + 0x440)
if flag == 257 or flag == 263 or flag == 33025 or flag == 1280 or flag == 1281:
pm.w_int(gmod_exe, client_dll["base"] + Offsets.ForceJump, 5)
else:
pm.w_int(gmod_exe, client_dll["base"] + Offsets.ForceJump, 4)
if __name__ == "__main__":
gui = GUI()
start()
```
gui.py
```python
import dearpygui.dearpygui as dpg
import app
import json
import os
def load_friends():
if os.path.exists(FRIENDS_FILE):
with open(FRIENDS_FILE, "r") as f:
return json.load(f)
return []
def save_friends(friends):
with open(FRIENDS_FILE, "w") as f:
json.dump(friends, f, indent=4)
def toggle_friend(sender, app_data, user_data):
steam_id = user_data
friends = load_friends()
if steam_id in friends:
friends.remove(steam_id)
else:
friends.append(steam_id)
save_friends(friends)
get_playerlist()
def get_playerlist():
player_data = app.get_players()
friends = load_friends()
if dpg.does_item_exist("player_table"):
children = dpg.get_item_children("player_table", 1)
if children:
for child in children:
dpg.delete_item(child)
for player_name, steam_id in player_data:
with dpg.table_row(parent="player_table"):
dpg.add_text(player_name)
dpg.add_text(steam_id)
label = "Unfriend" if steam_id in friends else "Friend"
dpg.add_button(label=label, callback=toggle_friend, user_data=steam_id)
class GUI():
def init_menu(self) -> None:
dpg.create_context()
dpg.create_viewport(title="Nexus External ESP - V2", decorated=True, width=600, height=400)
with dpg.window(tag='w_main'):
with dpg.tab_bar():
with dpg.tab(label='Visuals'):
dpg.add_checkbox(label='Box ESP', tag='c_box', default_value=True)
with dpg.tooltip("c_box"):
dpg.add_text("Draws a box over players.")
dpg.add_checkbox(label='Skeleton ESP', tag='c_skeleton', enabled=False)
with dpg.tooltip("c_skeleton"):
dpg.add_text("Draws player skeletons.\nIf the server has a badly made model, it will show a messed up skeleton.")
dpg.add_checkbox(label='Tracer ESP', tag='c_tracer')
with dpg.tooltip("c_tracer"):
dpg.add_text("Draws tracer lines to players.")
dpg.add_checkbox(label='HP', tag='c_hp_text', default_value=True)
dpg.add_checkbox(label='Name', tag='c_name', default_value=True)
dpg.add_checkbox(label='Weapon', tag='c_weapon', default_value=True)
with dpg.tooltip("c_weapon"):
dpg.add_text("Draws the name of the held weapon.")
dpg.add_checkbox(label='Distance', tag='c_distance')
dpg.add_checkbox(label='Crosshair', tag='c_crosshair', default_value=True)
with dpg.tooltip("c_crosshair"):
dpg.add_text("Dynamic crosshair.\n\nWhen you look at a player the crosshair turns red.\nIf you activate the triggerbot:\nthe crosshair will be blue, if you look\nat a player it will be dark blue.")
dpg.add_text("")
dpg.add_checkbox(label='Hide Dormants', tag='c_hidedormant')
with dpg.tooltip("c_hidedormant"):
dpg.add_text("Hide Dormant Players on the ESP.\n\nPlayers become dormant when they leave\nthe Potential Visibility Set on the server.\nThis can also exclude fake players on the ESP.")
dpg.add_checkbox(label='Hide Invisible', tag='c_hideinvisible')
dpg.add_checkbox(label='Hide Noclipping', tag='c_hidenoclipping')
dpg.add_checkbox(label='Only Real Players', tag='c_onlyplayer', default_value=True)
with dpg.tooltip("c_onlyplayer"):
dpg.add_text("Show only entities with a SteamID.\n\nAllows you to hide entities that are\nnot real players.\nMust be unchecked if you want to do\ntesting with bots.")
dpg.add_checkbox(label='Only Friends', tag='c_onlyfriends')
dpg.add_checkbox(label='Only Invisible', tag='c_showinvisible')
dpg.add_checkbox(label='Only Noclipping', tag='c_shownoclipping')
with dpg.tab(label='Players'):
with dpg.group(horizontal=True):
dpg.add_button(label="Refresh", callback=get_playerlist)
dpg.add_color_edit(default_value=(0, 255, 255), tag='c_friends_colors', label="Friend Color",display_type=dpg.mvColorEdit_uint8, no_inputs=True, no_alpha=True)
with dpg.table(tag="player_table", header_row=True, borders_innerH=True, borders_outerH=True, borders_innerV=True, borders_outerV=True, resizable=True):
dpg.add_table_column(label="Name")
dpg.add_table_column(label="SteamID")
dpg.add_table_column(label="Action")
with dpg.tab(label='Blatant'):
with dpg.group(horizontal=True):
dpg.add_checkbox(label='Triggerbot', tag='c_triggerbot', enabled=False)
with dpg.tooltip("c_triggerbot"):
dpg.add_text("Clicks for you when you are hovering over a target.")
dpg.add_radio_button(tag="c_click_method", items=['Hold', 'Tap'], default_value="Hold", horizontal=True, enabled=False)
with dpg.tooltip("c_click_method"):
dpg.add_text("Should the triggerbot hold the click or spam click.")
dpg.add_checkbox(label='Bhop', tag='c_bhop', enabled=False)
dpg.add_text("")
dpg.add_text("Detected by some anticheats!", color=(240, 47, 28))
dpg.add_checkbox(label='Enable writing to game memory and other sensitive features', tag="blatantcheck", callback=enableblatant)
with dpg.tooltip("blatantcheck"):
dpg.add_text("By default, Nexus External only lets you\nenable cheats that only read game memory,\nwhich is undetectable for a game like gmod.\n\nBy checking this box, you will be able to use\nother cheats that write to the game's memory,\ngood anticheats can detect this.")
with dpg.tab(label='Config'):
dpg.add_checkbox(label='Notification when someone is spectating you', tag="c_spectate", default_value=True)
with dpg.tooltip("c_spectate"):
dpg.add_text("Show a message if someone is spectating you.")
dpg.add_checkbox(label='HUD', tag="c_hud", default_value=True)
with dpg.group(horizontal=True):
dpg.add_text("ESP Method")
dpg.add_radio_button(tag="c_esp_method", items=['EntityPos', 'BonesPos (experimental)'], default_value="Normal", callback=bone_mode)
with dpg.group(horizontal=True):
dpg.add_text("ESP Color")
dpg.add_radio_button(tag="c_entcolor", items=['Unicolor', 'Visibility', 'Team', 'Health'], default_value="Visibility")
dpg.add_color_edit(default_value=(0, 255, 0), tag='c_unicolor', display_type=dpg.mvColorEdit_uint8, no_inputs=True, no_alpha=True)
with dpg.group(horizontal=True):
dpg.add_text("Max ESP Distance")
dpg.add_slider_int(min_value=0, max_value=1000, tag="c_maxdistance", default_value=0)