How can I patch memory spoofing?

I’m only wondering this to learn, not relying on memory check anticheats. I was always told it was a 1 line detection but I can’t figure it out. Any pointers?

1 Like

Please help. I’m ripping my hair out here.

You don’t. Don’t rely on client-reported values to detect cheating.

I’m not using it to check client-reported values - I’m more of using it to learn, (yes I have a client anticheat, because my game genre is a game genre where all the exploiters are script kiddies, so a client one would suffice), and I have my main anticheat on server.

I doubt people that know would even answer you, most likely even they aren’t even in the DevForum

So you want to get how much memory the client is using? Use this:

local Stats = game:GetService("Stats")
local usage = Stats:GetTotalMemoryUsageMb()


although this is the worst way you could possibly detect cheats on the client, being rude to you wouldn’t solve your question and would just be narcissistic

most of these bypasses spoof the memory by returning a random value every time a memory tracking function is called, but you could just call them twice at once, this will detect random numbers

while task.wait() do
	if gcinfo() ~= gcinfo() then
		--player spoofed memory

to prevent players from just returning a static value, you can check if the number hasn’t changed for like 20 loops, if it hasn’t, they spoofed the memory.


Oh okay, thanks! Appreciate it.