I’m making an anti-exploit, and am trying to make it so certain people bypass the system via a table (with their UserId)
That doesn’t work though, can I have some help?
I’m making an anti-exploit, and am trying to make it so certain people bypass the system via a table (with their UserId)
That doesn’t work though, can I have some help?
Sometimes exploiting needs a slight clarification from the paranoia surrounding it.
A more appropriate name of bypass should be whitelist
. Change the strings to numbers instead. Anti-exploits on clients can still be bypassed by an exploiter by simply removing the script.
Read this:
I think you are not getting a correct value check from a table.
You should use:
Backpack.ChildAdded:Connect(funciton(Obj)
if obj:IsA("HooperBin") then
for i,v in pairs(bypass) do
if v[i] == tonumber(LocalPlayer.UserId) then
print("AEL - ADMIN USAGE")
else
LocalPlayer:Kick("AEL - EXPLOIT DETECTION - BTOOLS IS NOT PERMITTED")
end
end
end
end)
I hope this helps.
I will test that out now, I’ll get back with the results in a second.
Okay let me know the results once you test, thank you.
It didn’t work, it still kicked me.
I believe it is because of the “tonumber”
I already put them as the number, so should the whitelist table be via the username not userid?
What if you try to do:
Instead of:
if v[i] == tonumber(LocalPlayer.UserId) then
do:
if LocalPlayer.UserId == v then
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.