Hiya! I am making a anti theft / copy to my game.
I am trying to do it but it is not working
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
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.
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!
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.