Piracy Detection Script

Is it possible to make a piracy detector, I searched on here and found things for JavaScript when I’m using C#, I want to make something that could delete the game automatically

Generally it’s not possible. You can’t control what a client is doing on his pc - including cracking any such measure by modifying your shipped game. If the code runs locally, the user can modify it. I guess the only real option would be to rely on a distant service (like an online game hosted on a distant server) so you can validate the user’s identity.
I mean, you can try hard to make the pirating harder - and it only takes one enthusiast cracker to disable it and distribute his version.

Thanks for letting me know |: