Name Hack?

Well I was playing on an rp server earlier and some guy starts mic spamming and automatically changes his name to one of ours is this a hack or what is it?

No… it’s not a hack… It’s a 4 line Lua script.

Oh whats the code for it?

hook.Add(“Think”, “NameHax”, function()
RunConsoleCommand(“setinfo”, “name”, table.Random( player.GetAll() ):Nick() … " " )
end )

You don’t even need Lua for it to work.
I only see 3 lines not 4

Sorry, I’m kind of a newb how do you run this in game?

Save it in steamapps/username/garrysmod/garrysmod/lua/ as something like “namehax.lua” then in-game type in the console “lua_run namehack.lua”


Another way of doing it OP would be:

alias namehax "setinfo name HACKER;wait 10;lol";lol


setinfo name HACKER;alias setinfo ""

Wow that’s cool.
It’s fun the things people think of.

Just as an FYI, name changers don’t make you unbannable/unkickable. It’s in fact still quite easy.

steamid, userid

When I try to run it, it gives me this error.

 NameHax.lua:1: unexpected symbol near '1.' 

You put that straight into your console, no Lua.

Nevermind fixed it.


Well if your changing your name every less than half a second they wouldn’t know who their looking for though wouldn’t they? Even from console.

Actually they would, it’s just that some people can’t.

How so?

Type status every few seconds in console then match the names and steam-ids up duhh.

It’s fairly easy to find out who’s doing it through HLSW since it can sort players by SteamID. Just right click the tard that’s changing his name constantly -> Copy -> Global ID. Or even kick/ban directly from HLSW.