Hello lads,
Today I came with a question:
How could I prevent exploiters abuse remote?
I also inspired by topic (didnt foind da link
), where the main question was how to prevent exploiters abuse remote events.
Is that actually useful?
Depends on situation. Exploiters have to launch the loop with Remote:FireServer() 5-8 times to actually drop it (nearly lol)
Well, how my practice showed, you CAN drop an event (very commonly drops when Remote has been fired, but wasn’t catched by server or client and like that). And as my practice showed, exploiters could drop your event and cause lags (with last i don’t really agree, maybe it was something other bruh).
Is the script optimized?
Yes. I used table methodic and collected data from players which were fired the remote, and how much did they fired the current event.
Code
First of all, we need to create a value which contains current server tick’s time. Let’s add NumberValue into server storage and name the value TickValue
Must be a server script;
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local RunService = game:GetService("RunService")
local TickValue = ReplicatedStorage:WaitForChild("TickValue")
task.spawn(function()
while RunService:IsRunning() and task.wait() do -- if the game is active, then:
TickValue.Value = tick()
end
end)
tick - gives time that passed starting from 1st January 1970th.
So, let’s write a code for Anti Dropper (or abuse)
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Event = ReplicatedStorage:WaitForChild("ExploitMe") :: RemoteEvent
local TrackingPlayers = {}; -- list with players and their total amount of fired events
local TickValue = ReplicatedStorage:WaitForChild("TickValue")
Players.PlayerAdded:Connect(function(Player)
TrackingPlayers[Player.Name] = 0; -- add start amount for the list
end)
Players.PlayerRemoving:Connect(function(Player)
TrackingPlayers[Player.Name] = nil; -- removing from list
end)
Event.OnServerEvent:Connect(function(Player)
if TrackingPlayers[Player.Name] then -- if player in da list, then:
TrackingPlayers[Player.Name] += 1
if TrackingPlayers[Player.Name] >= 100 and tick() - TickValue.Value < 1 then
-- if count of fired by player event is higher than 100, and time that passed from last fire is lower than 1 second, - meaning player is a potential exploiter
return Player:Kick("mr bozo")
else
-- else everything is good, removing 1 from total fired events
task.delay(1, function()
TrackingPlayers[Player.Name] -= 1
end)
end
end
-- your code in here (won't be procedured if player was detected in exploiting earlier)
end)
Works on any scripts tho (local, server), but server is recommended to use
Any questions? Ask ahead!
Still, just for example, I used this script for my gunsystem and detect if player abusing sound event which replicates to everyone.
![]()