Where about does that go then?
Still didn’t work. I tried it both in studio and on roblox
for i,v in pairs(whitelist) do
if LocalPlayer.UserId == v then
-- code
end
end
It’s probably because you are storing the data as string instead of number. Try to change that.
How do I do that? Is it on the local whitelist = {“USERID”, “USERID”} if so, can you tell me where
Just do it like that:
local table = {213123, 21313212, 123123}
Where’d that go then? Does that replace the local whitelist
Yes you have in table “whitelist” written numbers as string like: “213123” you should write numbers in table without " ", like 213123.
Right, I’ll test that out now.
Try this, I didn’t test it because I wrote it on my phone.
local bypass = {} -- put your ids here, as numbers, not an string
local Player = game.Players.Localplayer
Backpack.ChildAdded:Connect(function(Obj)
if Obj:IsA("HopperBin") then
for _, v in pairs(bypass) do
if v == Player.UserId then
print("Is admin")
break
else
Player:Kick("BTools are not permitted")
break
end
end
end
end)
I don’t think that’ll work because you put Player:Kick and it’s normally LocalPlayer:Kick
Didn’t work… Same thing happened and it just ignored it.
That’s his variable name.
I changed it up a small tad and I’ll try it now
local Players = game:GetService("Players")
local LocalPlayer = Players.LocalPlayer
local whitelist = {112007483, 155746202}
repeat wait() until LocalPlayer.Character
repeat wait() until LocalPlayer:FindFirstChild("Backpack")
local Character = LocalPlayer.Character
local Backpack = LocalPlayer:WaitForChild("Backback")
-- AE Anti-Btools
Backpack.ChildAdded:Connect(function(Obj)
if Obj:IsA("HopperBin") then
for i,v in pairs(whitelist) do
if LocalPlayer.UserId == v then
print("Admin.")
else
LocalPlayer:Kick("AEL - EXPLOIT DETECTION - BTOOLS IS NOT PERMITTED")
end
end
end
end)
To achieve what you’re looking for, you can utilise the newly added table method table.find. It will check if the specified value is in an array and return its index if it is or nil
if it isn’t. Here is how you could use it:
local Players = game:GetService("Players")
local LocalPlayer = Players.LocalPlayer
local Backpack = LocalPlayer:WaitForChild("Backpack")
local Whitelist = {123, 456} -- change to your userid
Backpack.ChildAdded:Connect(function(Obj)
if Obj:IsA("HopperBin") then
if not table.find(Whitelist, LocalPlayer.UserId) then -- if player isn't on whitelist
LocalPlayer:Kick("BTools are not permitted")
end
end
end)
I’ll try that after I do this quick test.
So far it currently works but I haven’t tested it WITHOUT being whitelisted, which I’ll do now.
It works! Thank you so much!
also
serverside checks are better, they can make a anti-kick script for bypassing those.
u need to make the anti-exploit serverside. Or else it wont work