Sorry to inform, but it takes an exploiter way less time to delete this script then it takes you to write it. Anti cheats on the client are never a good option. An exploiter can simply delete or disable your scripts.
In addition, exploit detection scripts based off any information provided by the client should never be trusted as anything the client tells you can be easily manipulated. As @Sensei_Developer stated on their reply, you should be worrying about making server protection instead.
I suggest you check out this post. It’s one of the greatest community resources ever posted in the developer forum.