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)
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)
This should be obvious... You didn't make a check when pass will equal true. Please review your script for obvious errors please before posting here.