So, it's possible to get a script to implement it in a game to break down after it got stolen? (Did I ask this correctly?)
You keep saying "steal" and "stolen", but you realize that when it comes to data and people say "data theft", most of the time what they really mean is "illegal copying" or "software piracy" since the original doesn't go anywhere after they copy it.
If you have ever copied some game you bought onto a USB before and given it to a friend, you are technically giving him an illegal copy (like stolen goods, except not stolen, just pirated). There's no real way to stop someone making a complete copy of your game and in fact, when you upload a game somewhere to let people download it (whether it is on a marketplace like Steam or a free host like RMN), the server is making a copy of it for the people who download it. So if you tried stopped any copies from being it, you wouldn't even be able to distribute it online.
Usually, the companies who bother putting any sort of protection in place for piracy need to have a whole digital-rights management server set up for it, where the player requires an internet connection because it pings the server to verify they own it. The simplest methods involve activation keys that only legit buyers will have and on the high-end you get stuff like Denuvo where you have whole set of system-scanning software running in the background at the same time as your game, constantly check the player's hardware and OS to make sure it is the "same" computer being used all the time.
Either way, it costs money to implement and if your game is anything popular, hackers will eventually find a way around it. Even big-budget "solutions" like Denuvo don't pretend they will last more than a month (they only advertise launch-week protection) and since that kind of stuff can slow down computers or stop the game being playable if/when the server goes offline (or if it glitches), players usually tend to hate the stuff (some companies even remove it themselves after enough time passes).
TL;DR - You don't use a "script" to stop your game being pirated, you usually need to rent or buy or set-up an authentication server to check for installation/activation keys and user machine info and it will only last until some hacker finds out how to spoof the OK signal sent from the server to the game.