Noblox.js with Raspberry Pi (4)?

NOTE: I wasn’t exactly sure if this was the correct place to ask this, it seems to fit the topic well enough.

I’m curious on how I can use noblox.js with a Raspberry Pi (4), as I want to use it to make my group VR-only.

Every other post uses glitch but it’s incredibly unreliable as it can take a long time to start, and somebody could easily let themselves into my group, etc.

I know how to port forward, but I don’t know how to install & use node for Raspbian, to setup noblox.js.

Anybody able to help?

A small guide would be incredibly useful.

See this guide to install node:
https://linuxize.com/post/how-to-install-node-js-on-raspberry-pi/

For noblox.js you can use either of these two command line scripts to install it:

# Run this to install noblox.js locally to your repository. 
$ npm install noblox.js@latest --save

# Run this instead to install noblox.js globally so you can use it anywhere.
$ npm install noblox.js@latest -g

See the github for more information about noblox.js: https://github.com/suufi/noblox.js/

2 Likes

TL;DR install node, install noblox.js and write some code

It’s easy to start using noblox.js, install node like the link in @ReduxGB’s post.

Once you have node installed, create a new directory using the mkdir command, and name it whatever you wish.
Now, run npm init and fill out the inputs as needed, you can hit enter for all the boxes(most of the time).

You’ll now have a file called package.json inside your project directory. Opening it using something like nano it should look something like this:

{
  "name": "tut",
  "version": "1.0.0",
  "description": "Tutorial for the devfourm.",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "BashGuy10",
  "license": "ISC"
}

Now since we have our node project initialized, we can install noblox.js and write some code!

I tend to just use npm i noblox.js to install it, but you can use the snippets in @ReduxGB’s post if you wish.
After running the command, package.json should have this bit added to the bottom.

"dependencies": {
    "noblox.js": "^4.7.3"
}

Now that we now noblox.js is installed, we can get into the programming.
We need to create our file that node will use, run touch index.js, now check if index.js exists by running dir. You should also see additional files like node_modules and package-lock.json.

Once you’ve checked that index.js exists, we can start editing the file, I use nano index.js to edit it in my Raspberry Pi.

Writing the following code down, we should have followed Roblox’s user.

const rbx = require("noblox.js")
async function run() {
    await rbx.setCookie("rblx security cookie here");
    rbx.follow(1).catch(console.error) // catch any errors that may happen
}

run();

For more functions, visit noblox.js’s wiki for help.

Code created on the fly, LMK if there are any errors that stop the program from running.
DM me or reply to this post if you have any extra questions about noblox.js.

2 Likes