Vykenos
(Vykenos)
November 19, 2019, 6:46pm
1
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.
Vykenos
(Vykenos)
November 19, 2019, 6:49pm
3
Yeah I do but I’m new to scripting and it doesn’t work.
https://gyazo.com/6c7a72a34b99cef048a619fc2d61d3ad.png
3 Likes
DevConX
(DevConX)
November 19, 2019, 6:50pm
4
@reset6220209 Ah I see your problem.
Is that a local script?
Vykenos
(Vykenos)
November 19, 2019, 6:50pm
5
Yes it is a local script, can you help me with it?
DevConX
(DevConX)
November 19, 2019, 6:51pm
6
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.
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
Mudwzy
(Meow)
November 19, 2019, 6:51pm
9
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
grilme99
(brooke)
November 19, 2019, 6:52pm
10
LocalScripts can kick the local player, but an exploiter can easily prevent that. You’d want to kick from the server.
mobyboyy
(mobyboyy)
November 19, 2019, 6:53pm
11
if Obj.ClassName == "HopperBin" then -- hopperbin is depreciated, that's probably why it's not working
1 Like
DevConX
(DevConX)
November 19, 2019, 6:54pm
12
@grilme99 Thats what I meant thank you for clearing it up.
Vykenos
(Vykenos)
November 19, 2019, 6:54pm
14
How do I kick them from the server then?
mobyboyy
(mobyboyy)
November 19, 2019, 6:57pm
15
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
Vykenos
(Vykenos)
November 19, 2019, 6:57pm
16
I tried and then gave myself a Hopperbin and it didn’t work so yeah
Vykenos
(Vykenos)
November 19, 2019, 6:58pm
17
Also what changes?? I don’t know what changes to make
Mudwzy
(Meow)
November 19, 2019, 7:03pm
19
Have you tried publishing the place and test it in-game?
Vykenos
(Vykenos)
November 19, 2019, 7:04pm
20
Just tried it now, didn’t work…
mobyboyy
(mobyboyy)
November 19, 2019, 7:10pm
21
Did you give yourself Btools? If you didn’t how do you know?
Vykenos
(Vykenos)
November 19, 2019, 7:13pm
23
So basically, the way I’d go about this is as follows:
--server script
--detect player entry
--detect new items in player's backpack
--is the new item titled "Hammer"?
--kick the player.
You’ll want to read through the following resources to create a solution:
use PlayerAdded to detect player entry.
access the player’s Backpack .
use the ChildAdded event to detect new items in the backpack.
compare the item’s Name to whatever you want to remove (in this case, Hammer).
use Player:Kick() to remove the player from the game.
Side note: in the future, please try to reduce the number of replies you post. If you want to add more information, you can edit your original post/existing replies. The devforum shouldn’t be used like an instant messager.
2 Likes