Script that only I can use

Hi

I am trying to make a section on my script so that it will only run if the creator’s username is ‘Rodozims’ and if not, it will print that the creator’s name is invalid (to lessen the chances of hackers using my code), but, it keeps printing it and not running.

I have tried using toolbox scripts, the AI generator, and rewriting it several times, but nothing has worked. If anybody could provide me with a working version, I’d really appreciate it.

2 Likes

Use a local script and check if the player is, well, you

1 Like

That’s literally what I did. It didn’t work.

The studio account is Rodozims, so that cant be the issue.

Use playeradded(plr), then use plr.PlayerId.

If player id is equals to yours, then dont do anything.

If its not, then delete the script.

I don’t mean only specific people will see the script, I mean it will only run if the game is uploaded on a specific user’s account.

If you atleast provide the code we can help you

make sure to tell us if it’s a local or server script

What do you mean by that could you elaborate?

It’s a localscript in StarterPlayerScripts.

Im pretty sure break only works in loops, unless you are looping

Basically, I don’t want people to be able to steal and use my code, if they get access (pretty easy as it’s a localscript) and this will make it so that it will only run on the official owner’s games.

Thats not the issue. This script has worked for over 3 years lol. As already said in the original post, I am trying to add another line which will stop others from using it in their own games.

If your using a local script only once then after you done you can do ‘script:Destroy()’

I would personally recommend you to prevent players from looking into your game itself(dark dex users). If you want me to explain I can

There are over 30 blocks that this effect needs to happen on. None, NONE of this script is broken. It is fully functional. I am trying to stop others from using it. Not “fix” this code.

You can’t do that probably only way is to delete the script when it’s finished

Here’s a version that I used AI to create, which I have used as an example, but I’m not experienced enough to make it work.

Also if your really that desperate you can make the script serversided

That wouldn’t work as it would either freeze because of the localplayer, or just show to everybody (the blocks disappear when the localplayer touches them)

So you want a script to ONLY run if YOUR the owner? And if not then do nothing?

Yes. Exactly that. I do not want ANYBODY else to be able to use my script. Not another human. I know they can just delete that [part of the script, but most darkdex users aren’t scripters and would probably thing that deleting it would break the entire script.