Require-by-ID is generally not recommended by Roblox as far as I know. They do not want dynamic code dependencies, as that can lead to backdoors and unexpected breakage. They’ve gone so far as deprecating features like LinkedSource. Usually, it’s preferred to have people just download and insert your module into their game. That way, autocomplete works automatically, and require’ing the module is less bulky because the developer does not need to define it’s type manually.
if you rlly don’t want ppl to see a source code then u shouldn’t make it public in the first place cuz if u want to release it for others then codes are publicly available to be readen, it’s called open source!
also with auto-complete you just showed there, required by ID doesn’t show because it’s in the cloud that isn’t in the game (they dont get type checked) but could still run whereas imported ones are shown cuz it’s there and it knows what’s inside
There’s no way to make a private module that can be required because that’s pretty much a security risk for any developer using it. If you don’t want your source code being revealed then you shouldn’t be making a public module to begin with.