Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Would my anti leak / GameCreatorId Script work?

Ok so here is my quick bit of poor scripting skills.

while true do
if game.CreatorId == (MyIdHere)
	then print("True")
else
	print("False")
    game.Players.LocalPlayer:Kick()
end

Would the game creator Id and then the value of my id there set of the next bit of then & else? If so how do you do it. I want it so if im not the game creator then it simply kicks all. Thanks in advance.

2 comments

0

P.s were I've put my ID Ive actually put my id as well.

0

Sadly this wont prevent this, unless if it's a fr00b trying to steal your game. You'll need to add more protection to your games. :c

2 answers

No, they can delete the script or disable it or rewrite it. Its not effective.

Some place stealing methods only take the geometry which includes parts and buildings which completely ignore your script.

Try the following in a regular script...

game.Players.PlayerAdded:connect(function(player)
--Variables
CreatorID = --Your ID here
PlayerName = --Put your ROBLOX username here, and make sure you update it if you change its name (if that's even possible :S)
if game.CreatorId == CreatorID then
	if player.Name == PlayerName then --Creates another protection layer, that will see if when a player joins, it's you, by your username.
		print("Welcome to your game, "..player.Name.."!")
else
	print("Intruder found!")
	player:Kick("You were kicked from this game.")
end

If you found this useful, please mark as the solution!

As always, keep the good scripting!

This discussion is preserved as it was. New answers, comments, and votes are closed.