Skip to content

Instantly share code, notes, and snippets.

View cosinewaves's full-sized avatar

cosinewaves cosinewaves

View GitHub Profile
@1Axen
1Axen / scheduler.luau
Created August 31, 2024 01:05
A simple fixed step system scheduler
--!strict
-- A simple fixed step system scheduler
-- Fixed updates can happen multiple times per frame
-- Variable updates will happen after all fixed updates complete
local FIXED_DELTA = (1 / 60)
local MAXIMUM_DELTA = (1 / 5)
export type System = {
@AzzaDeveloper
AzzaDeveloper / types.luau
Created March 16, 2025 14:34
Roblox Character Type (courtesy of ffrosfall!)
```lua
export type CharacterChildren = {
Humanoid: Humanoid & {
Animator: Animator,
},
Shirt: Shirt,
Pants: Pants,
["Body Colors"]: BodyColors,
["Shirt Graphic"]: ShirtGraphic,
HumanoidRootPart: Part & {
@cosinewaves
cosinewaves / table.lua
Created April 26, 2025 17:52
Roblox Animation Pack ID's in lua
{
Ninja = {
Swim = 658832807,
Idle = 658832408,
Jump = 658832070,
Fall = 658831500,
Walk = 658831143,
Run = 658830056,
Climb = 658833139,
},
@Mark-Marks
Mark-Marks / loader.luau
Created December 18, 2025 09:56
Roblox module loader with topological sorting via dependency resolution
type Array<T> = { T }
type Map<K, V> = { [K]: V }
type Graph<T> = Map<T, Array<T>>
-- Based on Kahn's algorithm
local function toposort<T>(graph: Graph<T>): Array<T>
local in_degree: Map<T, number> = {}
for node, neighbors in graph do
in_degree[node] = 0
for _, neighbor in neighbors do