[FREE] Nestify - 130 Lines, Dialects, Inheritance & Reactive Luau Framework
Nestify is a super-lightweight Luau framework (~130-145 lines depending on dialect) designed for declarative, inheritable, and reactive UI/instance development. It’s highly flexible thanks to dialects, which let you choose different syntax options depending on your style or project needs.
Features
Ultra-lightweight: ~130–145 lines of pure Luau
Multiple dialects: switch syntax styles easily
Inheritance & declarative: define components with reusable properties
Reactive elements: workarounds included for dynamic updates
Has Free compiler (Hierarchy Saver): Automatically turn Instance into Framework tree
Why Nestify + Hierarchy Saver
If you use Hierarchy Saver, you can compile Roblox Instances dirrectly into Nestify code, making it easier to manage, share, and maintain your projects. Nestify acts as a free framework, and Hierarchy Saver acts as its free compiler, giving you a complete lightweight workflow.
Installation
- Download Nestify from GitHub: GitHub - YarikSuperpro/Nestify
- Optionally, use Hierarchy Saver to serialize your components into Nestify code.
Formatting options:
Dialect (Formatting) [Children = {}] New “Class” Args{} Default (original) Default (original [Children]={}) Default new(Class,{}) Default new(Class,{}) Fusion like syntax Fusion like syntax
Major dialects code samples
Major dialects code samples
Lets create with decal in each to see how they differ.
Notice that dialects with[Children = {}]wrap children inside [Chlidren] = {}
local new = require("@self./Nestify") local Part = new {Class = "Part"; Name = "Hello"; {Class = "Decal"; Face = Enum.NormalId.Top; Texture = "rbxasset://textures/SpawnLocation.png"; } }local new = require("@self./Nestify") local Part = new("Part", { Name = "Hello"; new("Decal",{ Face = Enum.NormalId.Top; Texture = "rbxasset://textures/SpawnLocation.png"; }) })local Nestify = require("@self./Nestify") local new = Nestify.Nestify local Children = Nestify.Children local Part = new "Part" { Name = "Hello"; [Children] = { new "Decal" { Face = Enum.NormalId.Top; Texture = "rbxasset://textures/SpawnLocation.png"; } } }
Example Usage
Module
local RunService = game:GetService("RunService") local ListRGB:{GuiObject} = {} RunService.PreRender:Connect(function():() local color:Color3 = Color3.fromHSV(time()%1,1,1) for i,v in ListRGB do v.BackgroundColor3 = color end end) local module = { rgb = { _init = function(self:GuiObject):() table.insert(ListRGB,self) end; } } return module local Players = game:GetService("Players") local new = require("@self/Nestify") local Components = require("@self/Components") local screen = Instance.new("ScreenGui",Players.LocalPlayer:WaitForChild("PlayerGui")) local Part = new {Class = "TextButton", _base = Components.rgb; Text = "Click Me", Size = UDim2.new(0, 100, 0, 50), _run = function(self:TextButton):() self.Activated:Connect(function():() print("Im clicked") end) end } Part.Parent=screen Notes
- Nestify is intentionally minimal, giving you full control without overhead.
- Reactiveness requires workarounds by design, letting you learn and control updates manually.
Tutorial (in depth)
Click to expand
Nestify is built to be based on macros for setting things up
Here is an order in which macros/properties execute:
Properties:
Allows you to set properties.
Note that “Class” is mandatory (depending on dialect) unless you write a _base macro.
local Part = new {Class = "Part"; Name = "Hello"; Parent = workspace; } Macros:
_exec
Allows you to execute instance methods and has multiple syntax options:
Option 1:
{ _exec = { SetAttribute = { Hello = true; }; AddTag = {"Bye"}; } } Option 2:
{ _exec = { SetAttribute = { {"Hello";true;} }; AddTag = {{"Bye"}}; } } _base
Inheretance/commonly used patterns/initiation.
Allows you to create a linked chain of inheritance and abstract away initiation from the declarative part.
Note that this does not have a “Class” for base.
Note how _base can fit other macros inside itself, such as _exec, _run, other _base, and _init.
local base1:new.Base = { Name = "True"; _run = function(self:Instance):() print("My name is",self.Name) end; } local Base2:new.Base = { Archivable = true; _base = base1; } local Base3:new.Base = { Parent = workspace; _base = Base2; } local Part = new {Class = "Part"; _base = Base3; } _run
Initiator/Callback runs during instance creation and can yield an algorithm if the function you pass does yield. Use _init if you want to avoid this behavior.
Callback is optional; if you return an instance, it replaces the original.
Returns: self (instance we create), id (order can be useful with the _count macro; otherwise, it’s always 1)
No callback:
local Part = new {Class = "Part"; _run = function(self:Part,id:number):() self.Touched:Connect(function() print("Ouch") end) end; } Callback:
Replaces our “Folder” with a “Part”
local Part = new {Class = "Folder"; _run = function(self:Folder,id:number):Part self:Destroy() local heheh = Instance.new("Part") return heheh end; } _init
Exactly like _run but runs inside a task.defer (there so doesn’t yield) and doesn’t have a callback option.
local Part = new {Class = "Part"; _init = function(self:Part,id:number):() print("Initialized") end; } _count
Pretty interesting macro, although it doesn’t really have too many uses.
It allows you to return multiple instances, and for each of them, the _init and _run second argument “id” will be returned depending on the number of instances.
local Part1,Part2,Part3 = new {Class = "Part"; _count = 3; _run = function(self:Part,id:number):() print("My number:",id) end; } Links
- Marketplace: https://create.roblox.com/store/asset/115188415520345
- GitHub: GitHub - YarikSuperpro/Nestify
- Hierarchy Saver (optional compiler): GitHub - YarikSuperpro/HierarchySaver


