I currently have this remote that you can fire with some arguments. I set up a GUI on the client to fire it with some certain arguments. The only important one is the is the dmg.
This is my code. It is supposed to do this:
If your dmg is 200000000 then check your "Stand". If it is one of the whitelisted ones in the table then put the PASS value to true. If it is not one of them then make PASS false. For some reason PASS will not change even if the Stand name is in the table?
local hitbox = game.ReplicatedStorage.hitbox
local whitelistedstand = {"StarPlatinum(OverHeaven)", "TheWorld(OverHeaven)", "TuskAct4"}
PASS = false
hitbox.OnServerEvent:Connect(function(plr, speed, part, cframe, dmg)
print("FIRED!")
if dmg == 200000000 then
for _, v in pairs(plr.Backpack:GetChildren()) do
local Stand = v
print(Stand)
for E = 1, #whitelistedstand do
if Stand.Name ~= whitelistedstand[E] then
PASS = false
wait(1)
print(PASS)
break
end
end
wait(1)
if PASS == true then
print("No exploits detected")
end
if PASS == false then
print("BAN HAMMER!")
end
end
end
-- NORMAL DMG FUNCTION
end)

2 comments
I'm not sure if I understand what you mean...?
I thought you would read it. 1) You need an ELSE STATEMENT for other options. Let's say we have a "CHECK" for the color of an Apple. Green or Red. You would say "IF CHECK == "RED" and the apple was red it'd be true. However, if you don't specify another check to see if it's green it won't do anything. Review yourself and your basic script before asking.