Moudle script Anti theft not working

Hiya! I am making a anti theft / copy to my game.
I am trying to do it but it is not working :pensive:
I just started doing moudle scripting so I am so dumb haha

local module = {
	
	game.Players.PlayerAdded:Connect(function (plr)
		if game.PlaceId == 123 then -- changed due I don't want to leak stuff.
			print("This game is not got copied")
		else
			plr:Kick("  ")
		end    
	end)
}

return module

And I am trying to make it so if you deleted it, its still there.
Thank you if you did that :smile:

Not sure what you are trying to do, you cannot prevent a script from being deleted as if its in someone elseā€™s game, its theirs and they have full control of it. Closest youā€™ll get to ā€œanti-theftā€ is probably obfuscation, but if you donā€™t want your things public just keep them within your game.

1 Like

I am trying to make a moudle script about a anti theft
I see like alot of scripts ( in paid products too )
This script.

return(TheIDthingy or smth.)

You cannot make a full-proof anti-theft script, the person that gets the module can simply remove it, if you want a full anti-theft protection, simply keep it to yourself.

Unfortunately you cannot have a script recreate itself if itā€™s been deleted in studio itself. There are a few steps you can take to prevent your game from being stolen.

First Step: Donā€™t store every single asset of your game on the client, load and unload things as needed. The way people copy games is simple, it grabs all the data the client can access, things from Workspace, ReplicatedStorage, StarterPlayer, StarterGui, and StartperPack. By minimizing what is on the client you can make it super annoying to copy your game. However you cannot stop them entirely this way.

Second Step: Try and detect Dex or any other copy script. This can be done by monitoring memory usage, and the playerā€™s UI. While this is not gaurunteed to catch every single person using Dex, it will slow the script kiddies down.

Third Step: Accept the fact that you canā€™t stop every single exploiter from copying your game.

There is literally no 100% method for stopping expoiters, there are industry standards but nothing is concrete. Also remember that exploiters can only copy what their client can access, server scripts, and things stored on the server simply canā€™t be copied. Their copy of the game will be unplayable, until they do the work to finish the game themselves (see step 1). This also means that if this game ID check script is on the server, it will not be copied which will render the game unusable.

Also ModuleScripts require that you run a method or function within them, I do not believe you can require a module and automatically run code within it. Keep this in mind while using module scripts!

I am trying to understand if this is AI-generated or not, the question had nothing to do with script recreating it self either.

This is not an AI generated response. I am an actual human developer answering the question. To answer your concerns, the OP directly said he wants:

I am just highly experienced with anti-exploits and cheat detection, I am also usually very formal when helping users.

I take it as a compliment that you thought it was AI generated however,

Cheers!

OPā€™s question is not related to exploiting whatsoever, although I am unsure what he is on about, he referred to

so I assume he is trying to sell a module script that cannot be distributed.

isnā€™t monitoring memory usage unreliable

2 Likes

If you are unsure of what he is talking about, why are you questioning what I am saying. This question is specifically about exploiting, if you read the script you can see that it first checks the universe ID, if it is not the ID expected, then it will kick any players attempting to join the experience.

This is an anti-theft defense for a game, which the only way to steal a game is via using Dex (an exploit)

It can be generally yes, like when you as the developer are trying to load things into the client, it can cause memory spikes. That is why memory monitoring should be used for detection, not banning.

Along with memory usage you can also see if anything was added to the client recently and include that in say a Discord webhook, or other such things.

EDIT for a more in depth explanation:

Dex loads a large GUI for the client to explore the game, this is a huge client memory spike. By monitoring the memory, if it changes by any large metric (Defined by the developer) you can then send a webhook to any service that has webhooks, and then investigate that situationā€¦ Additionally you can add in extra information such as if the server added anything new to the game. If it didnā€™t then thereā€™s obviously some client manipulation we are not expecting, meaning it is likely cheating.

1 Like

i think the best solution here is to obfuscate your code since people would just remove the whitelist