Why am I apparently "exploiting" according to my script?

game.ReplicatedStorage.Events.ClosedCleanUp.OnServerEvent:Connect(function(plr)
	local rank = plr:GetRankInGroup(8342423)
	print("Recieved")

	if rank > 4 then
		print("Higher than 4")
		if game.ReplicatedStorage.Values.ControlPanelOpen == true then
			game.ReplicatedStorage.Values.ControlPanelOpen = false
			print("False")
		else
			warn("Exploiter!")
			local banPlr = game.Players:WaitForChild(plr)
			
			local name = plr.Name
			local Id = plr.UserId
			local link = "https://www.roblox.com/users/"..Id.."/profile"

			local e = MessageEmbed.new("webhook")

			e:SetTitle("Exploiter detected")
			e:SetDescription("USERNAME: **"..name.."**\nID: **"..Id.."**\nLINK: "..link)
			e:SetColor(16711680)

			e:PostAsync()
			
			bansDataStore:SetAsync("banstatus_"..banPlr.UserId)
		end
	end
end)

image
Why am I getting this response?
Thanks in advanced!

-SimplyFrazer

Contact Information

frazer#8981 - Discord
Message - Roblox

1 Like

it is currently running when the player has a rank above 4 and the control panel is not open. Try moving the else to the 1st if instead of the 2nd

My bad, I messed up this whole post. Please re-read it :slight_smile:

By the way, ControlPanelOpen is true

Wouldn’t suggest putting your webhook in public.

Mind if you were to develop a bit more your issue?

i hid the webhook

Anyway, the issue is that when I fire ClosedCleanUp it checks whether ControlPanelOpen is true, and if it is, it will make it false.

However, if ControlPanelOpen is already false, it will proceed with the exploiter protocol.

I am getting the exploit responce, not the expected one.

Well, I don’t seem to be understanding well.

As long asControlPanelOpen is false, it will return without exception "Exploiter !"

It seems to be pretty useless anti exploit? An exploiter can’t change a value if I’m understanding your situation well enough. They can change it, but whatever the value does, it would only do it on the client.

Huh? I’m talking about why I get the exploit response when ControlPanelOpen is true.

Yeah, it may be useless, but it’s just there for security reasons. Just in case there was a way to change it with an event or whatever

Is the value being set from a local script or a server script?

It should be set from a server script in order for the server to see it as ‘true’.

It is set to true on the server.

ControlPanelOpen is an instance I believe, try checking the Value property instead? (ControlPanelOpen.Value)

I’m not sure why you’re even banning based on a person’s rank in a group in the first place. The simplest solution would simply be to remove it, since it only bans people with a rank in the group with a priority higher than 4, which is setup to ban you and other high ranked people.

Although to answer your question, other people have pointed out that ControlPanelOpen seems to be a BoolValue instance, in which case you should be indexing its Value property to check for equality with true.

Omg i’m an idiot , thanks. next time i’ll check again

It should be impossible to fire ClosedCleanUp without being a rank higher than 4. In conclusion, if it is fired by a person under the rank 4, they must be an exploiter.

If thats the case then you should be doing this:

if rank >= 4 then -- I'm assuming you have to be rank 4 or higher
    doStuff()
else
    ban()
end

In your code snippet, a person is flagged as an exploiter if their rank is higher than 4 and doesn’t have their control panel open. I don’t know if you fixed this yet, but if you haven’t then you probably should.