Skip to content

Instantly share code, notes, and snippets.

View WBlair1's full-sized avatar

world destroyer WBlair1

View GitHub Profile
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local ServerStorage = game:GetService("ServerStorage")
local CollectionService = game:GetService("CollectionService")
local ClassService = require(ServerStorage.Services.Gameplay.ClassService)
local Constants = require(ReplicatedStorage.Gameplay.Constants)
local NPCSenses = {}
function NPCSenses.GetEnvironmentFeatureVector(npc, abilityDebounces)
@stravant
stravant / GoodSignal.lua
Last active September 7, 2025 15:23
Good Roblox Signal Implementation
--------------------------------------------------------------------------------
-- Batched Yield-Safe Signal Implementation --
-- This is a Signal class which has effectively identical behavior to a --
-- normal RBXScriptSignal, with the only difference being a couple extra --
-- stack frames at the bottom of the stack trace when an error is thrown. --
-- This implementation caches runner coroutines, so the ability to yield in --
-- the signal handlers comes at minimal extra cost over a naive signal --
-- implementation that either always or never spawns a thread. --
-- --
-- API: --