What do you want to achieve? Keep it simple and clear!
An anti-script injection that doesn’t kick someone for lag
What is the issue? Include screenshots/videos if possible!
It works for faster clients, but if you have any lag it will kick you which is a problem.
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I tried adding a waiting function before it all, it just broke the script.
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
local lastTime = tick()
local runservice = game:GetService("RunService")
local ExploitBan = game.ReplicatedStorage:WaitForChild("ExploitBan")
runservice.RenderStepped:connect(function()
local fps = math.floor(.5+(1/(tick()-lastTime)))
if ((fps <= (1+1)) and (workspace:GetRealPhysicsFPS() > (1+1))) then
ExploitBan:FireServer("Traceless Error (External Script Ran)")
elseif ((fps > (1+1)) and (workspace:GetRealPhysicsFPS() <= (1+1))) then
game.Players.LocalPlayer:Kick('\n\nClient crashed.')
elseif ((fps <= (1+1)) and (workspace:GetRealPhysicsFPS() <= (1+1))) then
game.Players.LocalPlayer:Kick('\n\nUnknown Error')
end
lastTime = tick()
end)
Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.
This isn’t really gonna work at all as it’s client-sided. If you need an anti exploit for more than basic stuff such as flying or speed hacking then invest in a better codebase.
Making a client-sided anti-exploit is pretty pointless since an exploiter can disable the script and can do anything to their client. Because of this, the server is the only reliable place to create an anit-exploit script. In terms of a game-specific A-E, the best thing to do would be to protect any remote events that fire to the server. For a more general A-E, instead of kicking an exploiter, it’s better to set their character back to the last “normal” state (speed hacking = tp them back to a normal point, tp hacking = tp them back, etc.). A laggy player will usually look like an exploiter to an A-E no matter how good it is and there isn’t much to be done about it.
I think the one who should be quiet here is you. I have seen you around the dev forums and you keep criticizing people about their opinions yet you say you are able to do something and don’t have any proof of it. You’re all talk no action. If you want people to understand you need to show an example of what you mean. If your answer to my question was simply: “Yeah, I keep them private because I don’t want them leaked and patched.”. This really doesn’t help at all the person. Wanna prove myself wrong? Show how you would do it better. I am sorry if this post offends you but you need to understand that simply saying something doesn’t help AT ALL.
I think it’s great that you’ve been able to see me around the forum replying to delusional people that imagine that you can’t make the client somewhat secure. You must’ve learnt something reading everything i’ve replied with. Give me something that you imagine is impossible to do on the client and i’ll show you that it’s most likely possible.