just make a script that can detect injection because all executors inject code/script in your game and if you can achieve to detect that you can probably block it
Thatâs the whole point of this topic - @FancyDucc is looking for a way to do that. If you know how, please share it
here is an example of how you might want to do it.
â Place this script in ServerScriptService
local checkInterval = 300 â Time in seconds between each scan (e.g., 300 seconds = 5 minutes)
local suspiciousParentContainers = {
game.Workspace,
game.ServerScriptService,
game.ServerStorage,
}
â Criteria for suspecting a script (very basic example)
local function isScriptSuspicious(script)
â Check for common suspicious indicators, e.g., obfuscated code or suspicious names
local suspiciousNames = {âhackâ, âexploitâ, âbackdoorâ, âinjectâ}
local nameLower = script.Name:lower()
for _, suspiciousName in ipairs(suspiciousNames) do
if nameLower:find(suspiciousName) then
return true
end
end
â You can add more checks here, like checking the content of the script
return false
end
â Function to handle new descendants being added
local function handleNewScript(script)
if isScriptSuspicious(script) then
print("Suspicious script detected and removed: " ⌠script:GetFullName())
script:Destroy() â Removes the suspicious script
â Additional actions can be taken here, such as alerting admins
end
end
â Function to scan for suspicious scripts
local function scanForSuspiciousScripts()
for _, container in ipairs(suspiciousParentContainers) do
for _, desc in ipairs(container:GetDescendants()) do
if desc:IsA(âLuaSourceContainerâ) then
handleNewScript(desc)
end
end
end
print(âCompleted a scan for suspicious scripts.â)
end
â Start the periodic scan
while true do
scanForSuspiciousScripts()
wait(checkInterval)
end
Thereâs just the problem that scripts added on the client donât replicate.
ok so i dont know how to make a script that knows if an exploiter injected any script in the games code. but maybe obvious changes that are not supposed to be there can help detect exploiters. here is an example script yet again if you want you can change some stuff inside the script this is the closest i can get
-- Place this script in ServerScriptService
local Players = game:GetService("Players")
-- Assuming achievements are identified by these names
local expectedTimeToComplete = {
["Achievement1"] = 600, -- 10 minutes in seconds
["Achievement2"] = 1200, -- 20 minutes in seconds
}
-- Function to handle starting an achievement
local function startAchievement(player, achievementName)
if not player.achievementStartTime then
player.achievementStartTime = {}
end
player.achievementStartTime[achievementName] = os.time()
print(player.Name .. " has started " .. achievementName)
end
-- Function to handle completing an achievement
local function completeAchievement(player, achievementName)
local achievementTimes = player.achievementStartTime
if not achievementTimes or not achievementTimes[achievementName] then
print("Error: No start time recorded for " .. achievementName)
return
end
local completionTime = os.time() - achievementTimes[achievementName]
local expectedTime = expectedTimeToComplete[achievementName]
if completionTime < expectedTime then
print(player.Name .. " completed " .. achievementName .. " suspiciously fast.")
-- Implement further actions such as alerting admins or logging for review
else
print(player.Name .. " has legitimately completed " .. achievementName)
end
-- Reset the timer for this achievement
player.achievementStartTime[achievementName] = nil
end
-- Example usage (normally these would be triggered by game events or RemoteEvents)
Players.PlayerAdded:Connect(function(player)
-- Simulating a player starting and completing an achievement
wait(5) -- Simulate time delay
startAchievement(player, "Achievement1")
wait(300) -- Simulate player takes 5 minutes to complete (should trigger suspicion for Achievement1)
completeAchievement(player, "Achievement1")
end)
I donât think there is any way to actually detect injection.
Very rarely, we ever see a âvulnerabilityâ in an exploit which allows for us to detect it.
ROBLOX tries their best to keep the anti-cheat up-to-date but its almost impossible to patch every method because every game is so different, so if they did make an in-game anticheat, innocent players might get banned a lot. (what Iâm trying to say is the only way ROBLOX can have an anti-cheat is to block it straight from the injection process, which isnât always the easiest,.)
Iâve seen exploiters get relatively annoyed at games like this:
Because it has some sort of âCharacter Frozeâ or some sort of check for the actual ragdoll, and when you inject into any roblox game, it freezes your game for a second, except, this can easily be bypassed by using âauto-injectâ or just injecting well in the loading screen, and it might kick laggy players.
Most executors nowadays just parent their scripts to unreachable places, like CoreScript packages, you can try detecting them but good luck with that. Plus theyâre still prone to ScriptContext
error signal.
Iâm curious, could a hacker change code in a local script and it would take place right away?
If I had a movement local script and inside it I put speed to 20, could they change that to 100 and then the local script put stheir movement speed to 100?
If thatâs infact NOT the case, I am curious, what if you made a crucial script for the game, like a movement script as I mentioned, and paired it with a cheeky client sided anticheat, so the anticheat is inside of the movement script, combined with the code.
(of course you would have a serversided anticheat too) but if they want to delete the client sided one, they would in theory have to delete the movement script, putting them at a disadvantage.
âIt wont matter cause they could just change their movement speed after deleting it!â
Server sided anticheat as mentioned too.
Just for context, I did make a script that when deleted kicks the player, if a cheat developer tries to bypass the client anticheat like that I can still counter it
Iâve worked with pentesters to develop my anticheat for my game (Isle). My game has had 80M+ visits in its 5 years lifetime. Iâve analyzed dozens of bypass methods. Iâm also doing security research outside of roblox. I will chip in a bit on anticheats.
You canât.
(If youâre doing it for fun and to learn, then itâs a great learning experience, and thereâs resources on devforum and roblox documentations implementing them. Iâve written about a method below using GetTotalMemoryUsageMb. Good learning experience, terrible in live games.)
Clientside Anticheats:
-
Client side anticheats will always be bypassed or will eventually fail. You are 1 developer. You have to somehow hold back dozens of smart exploiters (some of which are willing to spend every day to break apart your anti cheat). Without a 24/7 team, itâs a losing battle. The Roblox platform is always constantly updating too = more entry points + more broken scripts because of updates.
-
Exploiters have more resources than you. They can manipulate memory, mimic roblox services, override roblox properties, modify their humanoids. They can control everything on their computer, and everything on their roblox client. You can only control whatâs inside of the client.
-
Because of these reasons, you canât detect code injections or executions long-term.
A case study:
-
You write an anti cheat that checks for a memory spike for code injection detection. Suppose you check it with GetTotalMemoryUsageMb. If exploiters inject code the RAM will spike up and you can catch that.
- Exploiters can run the exploits before the game even loads and disable that script. Checker is now bypassed.
- Exploiters can also replace the API function with their own that returns always returns 50MB instead of the actual RAM reading. Checker is now bypassed.
-
The smart exploiters will find a bypass your check, then sell the details to the dumb exploiters. Pretty soon all exploits will have the bypassing feature. Youâll catch 90% of exploiters on day 1, but on day 100, youâre going to be catching 10%.
-
Not to mention when you add more content to your game, your RAM naturally goes up. This means you could accidentally kick real players because their RAM is high.
Actually Dealing with Exploiters:
-
Donât do a client side anticheat at all. Roblox is constantly pushing out updates and patches. Let the cheaters try and beat Robloxâs systems and worry about better things for your game.
- You spend a lot of time working on the anticheat to catch the 1% when you should be making new game content for your 99%. Unless that 1% is ruining the experience of the 99% itâs a waste of time.
- The # of cheaters are so rare that youâre more likely going to harm your normal playerbase with false positives if youâre inexperienced. False positives are when the anticheat punishes normal players unintentionally.
-
Everyone has mentioned here to do server checks. This is the best you can do on roblox. Check to see if incoming client data is valid or not. See Security Tactics and Cheat Mitigation | Documentation - Roblox Creator Hub.
- In my own game, I passively track the playerâs position. Itâs a variation of movement validation except thereâs no kicking involved. The playerâs âserverâ position is whatâs used to detect for interactions with the world. Picked up an item? Check the âserverâ validated position instead of HumanoidRootPart.Position, then give item, etc.
-
You can address the root cause instead of making an anti cheat. Understand that cheating is a social problem: people cheat to gain an advantage or get a reaction over others. You could address these problems by structuring your game a certain way where cheaters cannot reliably affect your players.
- Give power to the non cheaters: give them tools to keep out cheaters in their games. (Private Servers, Votekicks, Blocking/Blacklisting, Reporting/Moderation System, etc).
- Make cheating undesirable: make it as inconvenient to cheat as possible. (ban accounts with lots of items/time invested, do server checks, make a server side anti cheat, etc).
No clue why you reply to a topic / comment with such little knowledge about the subject.
There is no possible way you should call yourself some type of Anti Cheat specialist if the only thing youâve brought up in this thread is unreliable detection methods and false information.
Checking for spikes in the memory with any sort of tag is usually a bad practice and very unreliable because of all potential false positives.
Detecting injections by executors has never been impossible.
Having no client sided anti cheat is worse than having one.
If you could provide the details on your own implementation to a client sided anti cheat with evidence that itâs effective in a large game I will update what I said. Otherwise, I believe itâs not a practical use of time, especially for small studios.
Yes, this is why itâs mentioned in the case study/learning exercise and not me giving advice to use it in real games.
Again, if you can provide details on your own effective implementation for a large game it would be something interesting everyone could benefit from.
Itâs very easy to make injector detectors, the problem is keeping it running long term while dozens of exploiters are trying to bypass it.
I wonât publically give out detections for executors but iâll gladly develop an entire anti cheat just to prove you wrong (no offense)
Tell me what to do and you shall recieve (anti cheat)
With all the NetflixCE forks popping up and some of them not even requiring a teleporter game, the exploiting community manages to grow, the thing is that the ones Iâve seen just use a script in in CoreGui, is there any way to detect that?