Skip to content

Instantly share code, notes, and snippets.

@Anaminus
Anaminus / roar-search-queries.txt
Created April 16, 2024 05:53
Roblox API Reference search queries (WIP)
Expressions
foo bar : expressions foo and bar
foo && bar : foo and bar
foo, bar : foo or bar
foo || bar : foo or bar
!foo : negation of foo
(foo) : expression grouping
Simple
@Anaminus
Anaminus / css-menu-panels.html
Created March 12, 2024 20:17
Multiple menu panels through CSS only.
<!DOCTYPE html>
<!--
Multiple menu panels through CSS only.
Radio inputs control the panel state. The initial state, with no panels,
corresponds to the "none" input, which is checked by default. Labels are mapped
to each input, acting as the buttons that enter each panel. Each panel contains
a label that maps to the "none" input, which returns to the initial state.
// Structure and purpose based on theory. Nothing yet verified.
// keyIndex is an index known internally by Roblox, corresponding to a private
// key. An FFlag configures Studio to select a specific index.
//
// Possible FFlag candidate is "KeyRing". Currently, it has a value of 10, while
// DataModelPatch.rbxm contains signatures for indices 9 to 12.
struct Signature {
u32 version; // Zeroed. Possibly version reserved for format changes.
@Anaminus
Anaminus / Build.rbxmk.lua
Created December 20, 2022 01:43
Wrangle package-structured projects to be more DataModel-friendly via Rojo
--[[
NOTICE: Requires unreleased version of rbxmk
https://github.com/Anaminus/rbxmk
Usage:
local Build = rbxmk.runFile("Build.rbxmk.lua"))
@Anaminus
Anaminus / rbxl.hexpat
Created November 10, 2022 02:43
ImHex pattern for the RBXL format.
// ImHex pattern for the RBXL format.
//
// Not currently supported:
// - Chunk decompression (use rbxfile-dcomp to decompress chunks)
// - Deinterleaving
// - Property value decoding
// - Zigzag decoding
// - Circular shift decoding
#pragma endian little
--[[
Usage:
rbxmk run fix-welds.rbxmk.lua PATHS
Scans each given file or directory path for rbxm and rbxmx files. For each such
file, scans for WeldConstraint instances. For each WeldConstraint, sets the
Enabled property depending on the State property.
This allows Rojo to properly sync the enabled state of WeldConstraints.
@Anaminus
Anaminus / BrickColor.json
Last active October 28, 2022 20:09
BrickColor data
{
"BrickColors": [
{
"Color": [
0.9490196704864502,
0.9529412388801575,
0.9529412388801575
],
"Color8": [
242,
@Anaminus
Anaminus / Maid.lua
Last active January 17, 2024 18:42
Standalone ReactiveX module ripped from Nevermore.Rx
--@sec: Maid
--@doc: The Maid module provides methods to manage tasks. A **task** is any
-- value that encapsulates the finalization of some procedure or state.
-- "Cleaning" a task invokes it, causing the procedure or state to be finalized.
--
-- All tasks have the following contract when cleaning:
--
-- - A task must not produce an error.
-- - A task must not yield.
-- - A task must finalize only once; cleaning an already cleaned task should be
@Anaminus
Anaminus / place2project.rbxmk.lua
Created June 29, 2022 14:32
rbxmk script to base a Rojo project off of a place file. MUST BE RUN WITH LATEST UNRELEASED VERSION OF RBXMK
--[[
Usage:
rbxmk run place2project.rbxmk.lua --place PATH --project PATH [--output PATH]
Merges an rbxl file with a template project.json file to produce a final
project.
The place file will be converted to a project file, then the template project
file will be merged into it. The template should have the usual content for a
@Anaminus
Anaminus / download-assets.lua
Created March 10, 2022 01:30
Download assets from Roblox
-- Download list of assets. Input is a file containing a list of asset IDs, one
-- per line. Output is a path to a directory.
--
-- Usage:
-- rbxmk run download-assets.lua INPUT OUTPUT
--
-- Example:
-- rbxmk run download-assets.lua assetList.txt assets
local assetIDs, outputDirectory = ...