Skip to content

Instantly share code, notes, and snippets.

--Chickenrockets script editor colors - Paste this in your command bar
--Full disclosure I have no idea where these colors came from originally!
local s = settings().Studio
s["Background Color"] = Color3.fromRGB(18,17,17)
s["Text Color"] = Color3.fromRGB(210,190,121)
s["Keyword Color"] = Color3.fromRGB(102,194,146)
s["Number Color"] = Color3.fromRGB(236,154,100)
s["String Color"] = Color3.fromRGB(152,195,121)
s["Comment Color"] = Color3.fromRGB(119,105,79)
s["Operator Color"] = Color3.fromRGB(102,194,146)
--!strict
--!native
--Polychrome effect - tag MeshParts with "Polychrome"
--Rewrites an editable image with some precalculate buffers each frame (because raw editableimages are memory capped!)
--Default values use about 30mb, but you can easily reduce/increase this with these two variables
--Try and be sane :)
local size : number = 128
local frameCount : number = 500
@MrChickenRocket
MrChickenRocket / DemoCode.lua
Last active April 10, 2025 19:13
Add SDF Strokes to editableImages in Roblox. Allows either full compositing or generation of a separate stroke image.
local module = require(script.StrokeScript)
local gui = game.Players.LocalPlayer.PlayerGui:WaitForChild("ScreenGui"):WaitForChild("ImageLabel")
local comp = game.Players.LocalPlayer.PlayerGui:WaitForChild("ScreenGui"):WaitForChild("CompositeImageLabel")
--Build a separate stroke image (white) and display it behind the src image
local stroke = 16
local strokeImage, origSize, finalSize = module:MakeStrokeImageFromAssetIdAsync(gui.Image, stroke)
if (strokeImage) then
local module = {}
local deltaTable = require(game.ReplicatedFirst.Modules.DeltaTable)
module.tables = {}
module.callbacks = {}
module.remoteEvent = nil
--Connect for a callback
-- function(currentTable, delta, oldTable)
function module:Connect(name, callback)
@MrChickenRocket
MrChickenRocket / FileIOModule.lua
Created June 17, 2023 02:05
Very simple roblox file proxy. Read Write ListDirectory
local HttpService = game:GetService("HttpService")
local BASE_URL = "http://localhost:3090/"
local FileService = {}
function to_base64(data)
local b = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
return ((data:gsub('.', function(x)
local r,b='',x:byte()
@MrChickenRocket
MrChickenRocket / DeltaTable.lua
Created February 17, 2023 18:17
Knit styled replicated table service
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Packages = ReplicatedStorage.Packages
local Shared = ReplicatedStorage.Shared
local TableUtil = require(Packages.TableUtil)
local DiffTable = {}
------------------------------------------------------------------------------------------------
local Frustum = {}
local function planeFromPoints(p0, p1, p2)
local normal = (p1 - p0):Cross(p2 - p1).Unit
return {
normal = normal,
d = -normal:Dot(p0),
}
end
@MrChickenRocket
MrChickenRocket / fileproxy.lua
Last active January 22, 2023 01:03
Roblox proxy server for writing files
local module = {}
local HttpService = game:GetService("HttpService")
function to_base64(data)
local b = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
return ((data:gsub('.', function(x)
local r,b='',x:byte()
for i=8,1,-1 do r=r..(b%2^i-b%2^(i-1)>0 and '1' or '0') end
return r;
--bresenham line walk
function MathUtils:BresLine(x0, y0, x1, y1, callback)
local sx,sy,dx,dy
if x0 < x1 then
sx = 1
dx = x1 - x0
else
@MrChickenRocket
MrChickenRocket / ReplicatedFirst_KinematicObjectsClientScript.lua
Last active February 11, 2025 05:10
Kinematic animated objects for roblox. Tag anchored server objects with "Kinematic" and the motion and physics code is magic'd away.
if (script:IsDescendantOf(game.ReplicatedFirst) == false) then
error(script.Name .. "needs to be in ReplicatedFirst")
end
local CollectionService = game:GetService("CollectionService")
local kinematicObjects = {}
local function AddInstance(target)