I am making a game where people can execute their own scripts, both client sided and server sided. The game will only be for mobile and have 1 player servers.
The game I am making utilizes the DataStoreService to make saves of not only their scripts, but everything they’ve done too. The problem is, people can get the DataStoreService and possibly clear everyone’s saves.
I have thought of checking if the script includes DataStoreService, but then I instantly realized that people can do this:
local a = "ta"
local e = "Sto"
local b = "Da"
local c = "vice"
local d = "Mess"
local g = "agi"
local f = "reSer"
local z = game:GetService(b..a..e..f..c) -- Da ta Sto reSer vice - DataStoreService
This would be fixed if a staff member comes in and adds DisableService() and EnableService(), I just can’t yet post in Engine Features. The function can only be called on the server, and finally, the usage would be:
Script execution is a very niche case, and I don’t think it’s needed to add the ability to enable and disable services for specific scripts. I’d recommend working on a sandboxing system that wraps these services through the environment and prevents the scripts from doing harm to saved data.
I am quite good at coding, yet I still don’t understand some things that you said, such as a sandboxing system, and I wouldn’t want to spend a whole lot of my time coding something just to prevent a script from getting a service. And I hope that stuff doesn’t include getfenv() and metatables, since I still don’t understand those.
A script quickly names the DataStoreService something fully random almost every time, but smart people (mostly just everyone) can still just use :GetService(). And a script other than the executor script will disable the DataStoreService for it. The function can’t just be called on itself when it has a disabled service.
Lol, when i say ‘documentation’ i don’t mean ‘community forum’. Things like the API Hub and it’s tutorials, as well as the Lua 5.1 manual especially are great sources. And if you feel like googling 15 terms, the luaU github docs are a good place too