Change users teamcreate permissions plugin

Hi there, I recently started making plugins, and now I’m making a plugin for me and a few friends which creates 5 parts at random positions with random sizes and colours. Now, because I know my friends, I’m implementing a piece that protects me from them using it on me lmao.

However, I also want them to get kicked out of TeamCreate if they use it in one of my TeamCreate sessions.
This is my code so far;

while true do
		local newtimer = timer - 1
		if newtimer == 0 then break end
		if game.CreatorId == 342291326 and game.CreatorType == Enum.CreatorType.User then
			 break
		elseif game.CreatorId == UhhDontKnowWhichGroupYet and game.CreatorType == Enum.CreatorType.Group then
			 break
		  end
		newMark:Clone()
		wait(1)
	end

newMark = new part being inserted
timer = a number value

As you can see I’ve it set up that it breaks the insertion loop if it’s being used in a team create owned by me, or a group, now I’m not sure how I’d change the plugin user’s permissions in the Team Create session. Is this even possible? If so, how?

Thanks in advance!

Intresting, wouldn’t it be much easier to just whitelist yourself, and other people you want to be able to use, this would make it so you don’t have to make the hassel of a blacklist and also seems a little extreme to kick them out of teamcreate if they try to run a piece of code that can be whitelisted.

Indeed, but I might make this a public plugin in the future, if so, I don’t really want to rewrite 90% of my code :wink:

So I basically need it to be ready to go public if I ever decide to make it public

You would have to rewrite 90% of your code to add a simple?

if Player.UserId == "Your Id" or Player.UserId == "Your Id" then
-- the script where it does the things you want it to do
end

Making this public wouldn’t be difficult , all you need to do is this

local OwnerId = game.CreatorId
if Player.UserId == OwnerId then

end
1 Like

Yeah didn’t think of that lmao.
Changed it a bit but indeed this works out.

Thanks!

However, it still doesn’t kick them out of the TeamCreate

I am not positive, but I would assume this would be impossible to be done so that plugins can’t invite themselves to team create if they wanted to be malicious.

1 Like

Hmm you got a point there.

Welp rip me then

Thanks you both for helping!

1 Like