How to implement a script from the web

So I want to basically script whitelist so that only players who buy this script can use the script in their game. My goal here was to do the following but I’m not exactly sure on how this would work.

  1. Write the script in Roblox then put it in github or another code holder.
  2. Make the script in the studio use an HTTP request to request that script. The whitelist script would check the game ID to see if that ID corresponds with any idea in the database.
  3. If it corresponds it sends back the main script so that the script will load in their studio.

Note: I’m attempting to make it where no one else can steal or use this script. I don’t want to obfuscate it because technically they can just copy the obfuscated script and still put it in their game.

Why don’t you just put the script into a part and then sell that part in the marketplace?

Because I don’t want that part being distributed among others.

Because Roblox is open-source they won’t allow methods of capitalizing off their platform without receiving compensation themselves. There is the risk that people would reproduce your script, but since it was made on Roblox for Roblox, you don’t own the script or any of the code written in it.