Help with changing rank in group via script (noblox.js) (again)

I’m struggling a lot with noblox.js, so I have two more questions.

  1. 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.

  2. 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?

1 Like

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.

2 Likes

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.

1 Like

Yes, I would like some example code. Thank you!

1 Like

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.

1 Like

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

2 Likes

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?

1 Like

you can use an environment file (.env) to store your cookie there and make your program access it using the module i suggested

1 Like

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.

1 Like

May you please send over that example code? The websites for node.js and noblox.js are hard to follow, so it would be very helpful.

1 Like