New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

robloxlayer

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

robloxlayer

Bot headless do Roblox para Node.js que funciona em ambientes sem interface gráfica

latest
npmnpm
Version
1.1.0
Version published
Maintainers
1
Created
Source

RobloxLayer

A headless Roblox bot for Node.js that works in environments without a graphical interface such as Replit, Render, and Termux. Allows you to control Roblox bots directly from the terminal.

Overview

RobloxLayer is a JavaScript library that allows you to create bots for Roblox without relying on a graphical interface or browser. Ideal for:

  • Automated game bots that interact in chat and move around
  • Headless environments like Replit and Render
  • Execution on mobile devices via Termux
  • Data collection and game monitoring automations

Features

  • Full Bot: Allows you to play Roblox without a browser or graphical interface
  • 100% Customizable: Configure each part of the bot according to your needs
  • Multiple Login Methods: Support for username/password or .ROBLOSECURITY cookie authentication
  • 2FA Support: Compatible with two-step verification
  • Gameplay Features: Movement, chat, script execution, and more
  • Smart Chat: Automatic responses and command processing
  • Modular: Enable only the modules you need
  • Efficient: Low memory and resource usage
  • Webhooks: Integration with Discord and other services

Installation

npm install robloxlayer

Basic Usage: Game Bot

const { RobloxLayer } = require('robloxlayer');

async function startBot() {
  const roblox = new RobloxLayer({
    debug: true,
    autoReconnect: true,
    modules: {
      movement: true,
      chat: true,
      scripts: true
    }
  });

  const loginResult = await roblox.login('your_username', 'your_password');

  if (loginResult.success) {
    console.log('Login successful!');

    const placeId = 123456;
    await roblox.joinGame(placeId);

    roblox.addChatAutoResponse('hi', 'Hello! I am a bot!');
    roblox.addChatAutoResponse(/how are you/i, "I'm good, thanks!");

    roblox.move('forward', 5);
    roblox.jump();
    roblox.look(45, 0);

    await roblox.sendChatMessage('Hello everyone!');
  }
}

startBot().catch(console.error);

Login and Authentication

Username and Password Login

const loginResult = await roblox.login('your_username', 'your_password');

if (loginResult.requiresTwoFA) {
  const code = '123456';
  const result = await roblox.verify2FA(code, loginResult.twoFATicket);

  if (result.success) {
    console.log('2FA verification successful!');
  }
}
const success = await roblox.authenticate('_|WARNING:-DO-NOT-SHARE-THIS...');

Game Control and Movement

await roblox.joinGame(1234567);

roblox.move('forward', 5, true);
roblox.move('backward', 2);
roblox.move('left', 3);
roblox.move('right', 1);
roblox.jump();
roblox.stopMoving();

roblox.look(90, 0);
roblox.look(0, -45);
roblox.look(null, null, {x: 10, y: 5, z: 20});

await roblox.leaveGame();

Chat and Auto Responses

await roblox.sendChatMessage('Hello all!');
await roblox.sendChatMessage('Private message', 'whisper', 123456);

const responseId = roblox.addChatAutoResponse('hi', 'Hello, how are you?');
roblox.addChatAutoResponse(/thanks/i, 'You are welcome!');

roblox.addChatAutoResponse('time', () => {
  return `Current time is ${new Date().toLocaleTimeString()}`;
});

roblox.removeChatAutoResponse(responseId);

const messages = roblox.getChatHistory(10);

Execute Lua Scripts

await roblox.loadScript('autoFarm');
const result = await roblox.executeScript('autoFarm', {
  targetItem: 'Coin',
  duration: 60
});

console.log(result.output);

CLI Commands

npx robloxlayer auth
npx robloxlayer user --username Builderman
npx robloxlayer game --place 123456 --join
npx robloxlayer system

Full Customization

const roblox = new RobloxLayer({
  userAgent: 'RobloxLayer/1.0 Custom',
  timeout: 60000,
  debug: true,
  autoReconnect: true,

  modules: {
    user: true,
    game: true,
    movement: true,
    chat: true,
    scripts: false
  },

  webhooks: {
    gameJoin: 'https://your-webhook.com/game',
    chatReceived: 'https://your-webhook.com/chat',
    error: 'https://your-webhook.com/error',
    all: 'https://your-webhook.com/all'
  }
});

Plugin System

const myPlugin = {
  name: 'MyPlugin',
  initialize: (roblox) => {
    roblox.myCustomFunction = async () => {
      // Custom implementation
    };

    roblox.chat.on('messageReceived', (message) => {
      // Custom message handling
    });

    return true;
  }
};

roblox.registerPlugin(myPlugin);

Examples

See the examples/ folder for complete examples:

  • examples/bot_example.js – Game bot with interactive chat
  • examples/headless_bot.js – Bot that runs in headless environments
  • examples/auto_farm.js – Bot that automatically collects resources

Running on Specific Environments

Replit

const { RobloxLayer } = require('robloxlayer');

const roblox = new RobloxLayer();
const loginResult = await roblox.login(
  process.env.ROBLOX_USERNAME,
  process.env.ROBLOX_PASSWORD
);

Render

// Same as Replit, use environment variables to login securely

Keywords

roblox

FAQs

Package last updated on 15 Apr 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts