Hello, all! My name is Titanic, and I’m starting up a small tech company on Roblox. We are trying to create a closed system that allowes specific players to use scripts, and such. Think of how private modules work. We were thinking it would be easiest to use a website to get the code from. But there’s a problem with this. Users can see that website in the script, and then view the code we are trying to hide. As I, nor my team are experienced in html, or anything other than lua… We would like to know, how we can stop players from viewing code on the website, while allowing Roblox servers/ games to.
Sorry for the poor formatting this was written on a phone.
I would recommend you bring this to the Platform Feedback Forums and post about how it is hard to allow only specific users access to scripts while not allowing others to not be able to use the published script.
It would be cool to see a type of published script where you can add or remove access to certain players, or even sell the scripts!
What you would have to use are http requests. Send messages to your server from the Roblox game, and act on the result the server sends back after processing it through your hidden code.
And I am respectfully telling you it won’t work because of that reasoning.
Licensing would work a bit better. It will scare malicious users away, and if it doesn’t and you catch them distributing your code without your consent you can start off with a “cease and desist” letter. If that doesn’t work you can take it a step further.
It’s just a matter of malicious users reading the decoded version.
@OP: Here is another question: is the product paid? @titaniclover201
I can agree with this. As @Frenchtoast0 said also though, I believe the better idea here is to go for licensing. Cryptography is very likely unhelpful in this situation, and is more complicated than it needs to be in order to do this “correctly.”
@titaniclover201 I omitted my answer because it was too crazily complex and not worth it. Basically, it’s impossible on Roblox. I would suggest using Roblox to learn, but if you are making a full on company, try a different game engine that’s more secure, such as Unity.
If you want only allow specific people to access data you need to create a private API that links to some sort of database such as mySQL, MongoDB or etc. that stores the scripts. In order to access the data you can just do a GET request including the api-key in the Headers.
I recommend using Express.js for the web framework and Mongodb/Mongoose for the database since they are a bunch of tutorials online on how to set that up, but any kind of backend web stack should be able to work.