Skip to main content

Init

A module loader for Roblox games. Drop modules in folders; Init loads, initializes and starts them in order.

No code to set up

Install the Init Framework plugin, press Setup, and your game has a loader, boot scripts and folders. Add modules with one click from templates.

Made for AI

An AI skill, copy-paste prompts and raw templates let Claude, Cursor or ChatGPT install Init and write modules the right way.

Predictable startup

Folders load in the order you list them. Every Init runs before any Start, and OnPlayerAdded, Step, OnCharacterAdded and friends are wired up for you.

Install

You are...Do this
New to scriptingInstall the Init Framework plugin, press Setup. Guide
Using an AI (Claude, Cursor, ChatGPT)Paste the prompt from Install with AI.
Using Rojo + WallyInit = "kashtheking/init@1.0.0" in wally.toml. Guide
Using Studio, no pluginDrag Init.rbxm from Releases into ReplicatedStorage.Packages.

What it looks like

-- ServerScriptService/InitServer (Script)
local Init = require(ReplicatedStorage.Packages.Init)

Init.start({
	{ Folders = { ReplicatedStorage.Network } },
	{ Folders = { ReplicatedStorage.Services, ServerScriptService.Services }, Predicate = Init.matchesName("Service$") },
})
-- ServerScriptService/Services/CoinService
local CoinService = {}

function CoinService.Init(self) self.Coins = {} end           -- own state only
function CoinService.Start(self) end                           -- other modules are ready
function CoinService.OnPlayerAdded(self, player) self.Coins[player] = 0 end
function CoinService.OnPlayerRemoving(self, player) self.Coins[player] = nil end

return CoinService

This repository

PathWhat
src/InitThe package (kashtheking/init)
templatesModule templates (Service, Controller, Binder, ...), used by the plugin and by AI
exampleA starter place: boot scripts, folders, one service and one controller
pluginThe Init Framework Studio plugin (FSL-1.1-ALv2)
skills/init/SKILL.mdThe AI skill
docsThe docs site (Moonwave)
testsLune tests: lune run tests/run
rokit install                                   # rojo, wally, lune, selene, stylua, luau-lsp
lune run tests/run                              # tests, no Studio needed
selene src templates example plugin tests/run.luau
rojo serve example.project.json                 # try the example in Studio
rojo build plugin.project.json -o InitFramework.rbxmx   # after `wally install` in plugin/

MIT licensed, except plugin/ (FSL-1.1-ALv2: free to use and change, not for a competing product; each version becomes Apache-2.0 after two years). Promise is evaera/roblox-lua-promise (MIT), bundled so Init has no dependencies.