How to make the script check some part in the text if it match

im trying to make anti cheat where it checks if the exploiter tried to make a script and then they are testing it
this is the error message if exploiter tested his script and had errors
image

i want the script to check this part
image
to be exact i want it to check the

Script  ''

part
if it matches then that script is nil and that guy is exploiting

You can use LogService for this, but it will not tell you where or from which client the outputted message was sent. And it is unreliable.

This event is only triggered when a client outputs something.

local LogService = game:GetService("LogService")

LogService.MessageOut:Connect(function(message, messageType)
	print(message, messageType)
end)

Ik ik did that and everything my problem is checking if the script’’ part match( if the script place is empty then that script is nil and that person is exploiting) thats my problem

nvm i found the solution it was

string.match()