Anti-Btools Script | Help?

Hey, I’ve been trying to make this anti-btools script for an hour and it’s not working.

I need a simple anti-btools script which makes it so if a person gets a tool called “Hammer” then they’re automatically kicked from the game.

Can someone help me with this and post it?

5 Likes

Do you have any code you’ve written so far that we can help you with? This category isn’t for requests.

Yeah I do but I’m new to scripting and it doesn’t work.

https://gyazo.com/6c7a72a34b99cef048a619fc2d61d3ad.png

3 Likes

@reset6220209 Ah I see your problem.
Is that a local script?

Yes it is a local script, can you help me with it?

If it is then you need to do a remote function to kick the player from the sever. Local scripts cant kick people from the sever.

Uhhh a remote function? Do you mean remote event or??

If it’s a localscript, it’s not going to be very secure (the exploiter can just delete the script before adding in the btools).

@DevConX This is incorrect. Player:Kick() works on the client.

3 Likes

You specified the name of the object you want to not be inside the game. You actually need to use the ClassName for using IsA. Replace line 8 with this :

if Obj.Name == "Hopperbin" then

2 Likes

LocalScripts can kick the local player, but an exploiter can easily prevent that. You’d want to kick from the server.

if Obj.ClassName == "HopperBin" then -- hopperbin is depreciated, that's probably why it's not working
1 Like

@grilme99 Thats what I meant thank you for clearing it up.

Didn’t work, and also moby idk what you mean by that

How do I kick them from the server then?

Don’t kick from the server, there’s no point. It’s useless. Just try instead to make the changes to the if Obj:IsA("HopperBin") then thing

I tried and then gave myself a Hopperbin and it didn’t work so yeah

Also what changes?? I don’t know what changes to make

Have you tried publishing the place and test it in-game?

Just tried it now, didn’t work…

Did you give yourself Btools? If you didn’t how do you know?