Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@rbxts/debris

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rbxts/debris

A port of RobloxianDemo's Debris module.

  • 1.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Debris

Debris is a highly personalized and lightweight application, served as an alternative to Roblox's traditional Debris service.

Installation

📦 — NPM:

npm i @rbxts/debris

🧶 — Yarn:

yarn add @rbxts/debris

📀 — pnPM:

pnpm add @rbxts/debris

Debris API

Types

type Object<T> = object | thread | RBXScriptConnection | Instance | Array<T> | [] | ItemCache<T>;

type ItemCache<T> = [T];

Debris.RemoveObject

function RemoveObject<T extends Object<Array<T>>>(object: Object<T>, objectClass: string): T;

Destroy the specified debris object.

Debris.AddObject

function AddObject<T extends Object<Array<T>>>(object: Object<T>, lifetime: number): ItemCache<T>;

Add the specified debris object.

Debris.AddObjectArray

function AddObjectArray<T extends Array<Object<Array<T>>>>(
	objects: Array<Object<Array<T>>>,
	lifetime: number,
): ItemCache<T>;

Add the specified debris objects.

Debris.RetrieveDebris

function RetrieveDebris<T extends Object<Array<T>>>(object: Object<T>): ItemCache<T>;

Retrieve the specified debris instance's table.

Debris.RetrieveAllDebris

function RetrieveAllDebris<T extends Array<defined>>(): ItemCache<T>;

Retrieve all debris instances.

Example

// Services
import { Workspace } from "@rbxts/services";

// Modules
import { AddObject, RemoveObject } from "@rbxts/debris";

// Functions
const Part = new Instance("Part");
Part.Name = "Part";
Part.Position = new Vector3(0, 5, 0);
Part.Size = new Vector3(5, 1, 5);
Part.Parent = Workspace;

AddObject(Part, math.huge);
task.wait(3);
RemoveObject(Part, "Part");

Keywords

FAQs

Package last updated on 13 Jul 2023

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc