How i can make Anti Exploit

In my game they made a free script / hack. And I’m trying to patch it. When the script is executed a print is shown. So what I am doing is the following:

  1. local player = game.Players.LocalPlayer
  2. if print (—) then
  3. player: Kick (“Imagine hacking a Lego game. Loser”)
  4. end

but it doesn’t work :frowning:, how can I detect prints?

I would recommend maybe trying a remote event, however, they cant always be secure.

This is a bad patch, especially since it’s client-side. This means that they can just delete this local script so that this script won’t even fire. Also, they can just delete the line that prints it.

I’m highly suggesting against using this method but if you want to check what the output says, use this:

--//Services
local Players = game:GetService("Players")
local LogService = game:GetService("LogService")

--//Variables
local LocalPlayer = Players.LocalPlayer

--//Functions
LogService.MessageOut:Connect(function(Message, Type)
	if Message == "Rox Hub Gui Loaded" then
		LocalPlayer:Kick("Imagine hacking a Lego game. Loser")
	end
end)

Put the script here:
image

3 Likes

That script isn’t working because print doesn’t return anything, so line 3 is being skipped over.

To see things that are printed use the LogService.

Also be aware that any client-sided anti-cheat can be easily bypassed by an experienced exploiter.

2 Likes

Anything local and resolved to a client is automatically a flawed Anticheat, as exploiters can disable and mess with anything on their own cracked client. You’ll have to run this thru a server script or some form to do so.

Trying to check and specify a ‘cheating software ready message’ usually never will get anywhere as we arent able to pass through or try to access anything within the client mainframe Also you cant check output because once again the point made above as well and can be accomplished thru remoteEvents as @Bear23913 said but in the end flawed cause its client sided :sweat_smile:

TL;DR utilize sanity checks, correct? Have the server verify/sanitize the information when it receives it from the client.

1 Like

I would just like to add thats there are hunders of exploits, you could never prevent all of them.

Firstly print() doesn’t return anything… use log service for that.
Second this is very bad as its client sided and the hacker can just destroy/disable it.
Third If you use synapse Internal ui and you click “Output Redirection” all prints Instead of going to the console will go to the synapse internal ui meaning it was just bypassed.