I’m struggling a lot with noblox.js, so I have two more questions.
How do I hide/protect my ROBLOSECURITY cookie using a .env file? I’ve tried following tutorials, but they are all confusing, so I would like someone to break it down to be a bit simpler.
All of the code examples given on the noblox.js website seem to be using javascript rather than lua, so how would I use it in my game?
Yes, the code examples from noblox.js are all in javascript, this is because noblox.js is really built for javascript usage. I’m not 100% sure how your webserver is set up, however, I would assume the following:
In its most simplest form, I assume you send an HTTP request to your url, and then basically the noblox.js code you’ve implemented would be ran. You can use HTTP_Service, if you need help with some example code for what it would look like in lua, let me know.
As for hiding your cookie, it depends which service you’re hosting this on.
You can use the dotenv NPM package.
call .config() with no parameters to read the .env file in your project’s root directory, those values will be added into process.env.
That’s what the tutorials were saying. Can you please explain it more in depth? I don’t understand how to use the dotenv package, where to call .config, or what my project’s root directory even is. I don’t really understand anything having to do with code other than lua.
noblox.js is not a Lua package, it’s made for Javascript.
You can use NodeJS to host a simple API for your game to request, using the noblox.js library and express.
See https://nodejs.dev
Thanks for the link to nodejs. That will help me figure it out, but you still didn’t answer my question. Can you please explain in depth or give an in depth, easy to follow tutorial on how to hide my ROBLOSECURITY cookie?
As stated in the topic, I want to use a .env file, but I don’t know how. May you please provide an in depth description that is easy to follow for someone like me who has very little to no javascript knowledge on how to do that.