but the player can just delete that line, another solution I was thinking was obfuscating my code so they cant find where that line is but that would probably slow down my script.
I don’t see how it makes it a bad idea just because some may disagree with it. I’ve use services that has obfuscated scripts as I use third party services and I don’t mind them doing that, nor do the thousands of other customers that use those services.
A solution is: If someone leaks the model and you realize it, you can DMCA takedown request their leaks. This way, it means they were copyright striked. It is best recommended to copyright claim your model, in case it gets leaked.
There are not many tools for deobfuscation, as you might be wrong, the model can be copyright claimed, meaning if someone were to leak it, the leaker would get a DMCA copyright strike.
One problem with the DMCA claim route, and that is that Roblox will probably not do it. However, assuming they do take this route, they need to be sure that they can prove that this model is theirs, and not the copy. Roblox is very stingy with taking action on a DMCA claim, so you might want to have as much proof the asset you are selling is yours.
I accept that, but if roblox has dismissed the owners’ evidence as enough, then they would have permission to DMCA copyright strike the leaker’s model. This will not happen if the leaker gets permission from the owner/claimer to leak the owners’ model.
Since the script you provided is a server script, if it’s stolen via exploits, the server script can’t be decompiled so it’ll just end up being a blank script anyways.
To prevent models from being stolen or leaked, don’t release them, ever.
You could try using require() to import the code from a private asset, then nobody can change/access/see the code without that asset. You could add the placeId check in the module being required or maybe use MarketPlaceService to check if the owner of the game actually owns the correct model version.