Skip to content

Instantly share code, notes, and snippets.

type ModuleScript2 = ModuleScript
export type function ChildrenOfModule(inst: type, mod): type
local inst_type: type = ModuleScript2 or mod
local key_names = {}
local inst_property_set = {}
for inst_property in inst_type:properties() do
inst_property_set[inst_property:value()] = true
end
print("meow")
--!optimize 2
--!native
local task = (task or require("@lune/task")) :: typeof(task)
local tspawn = task.spawn
local cyield = coroutine.yield
local freeThread: thread? = nil
local function deletedSignalError()
@ffrostfall
ffrostfall / Region.lua
Created July 31, 2022 16:07
Region system
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local RunService = game:GetService("RunService")
local Signal = require(ReplicatedStorage.Packages.GoodSignal)
local Region = {}
local CurrentFocus = Vector3.new(0, 0, 0)
local CurrentRegion = nil
@ffrostfall
ffrostfall / Camera.lua
Created July 31, 2022 16:06
A W.I.P. camera thing
function Camera.Init()
Camera.ChangeState("menu")
RunService.RenderStepped:Connect(function()
local MouseSensitivity = UserSettings():GetService("UserGameSettings").MouseSensitivity
local Params = RaycastParams.new()
Params.FilterType = Enum.RaycastFilterType.Blacklist
Params.IgnoreWater = true
Params.FilterDescendantsInstances = { game.Players.LocalPlayer.Character }
@ffrostfall
ffrostfall / init.lua
Created July 31, 2022 16:04
Oldish external performance logging
local HttpService = game:GetService("HttpService")
local Players = game:GetService("Players")
local DataStoreService = game:GetService("DataStoreService")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Stats = game:GetService("Stats")
local LogService = game:GetService("LogService")
local StatisticsService = {}
local server_id = nil
@ffrostfall
ffrostfall / Keybind.lua
Created July 31, 2022 16:01
Keybind class
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local ContextActionService = game:GetService("ContextActionService")
local Signal = require(ReplicatedStorage.Packages.GoodSignal)
local Keybind = {}
Keybind.__index = Keybind
function Keybind.new(DefaultKey, ActionName)
local self = setmetatable({}, Keybind)
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local RunService = game:GetService("RunService")
local Network = {}
local AutoSerde = Instance.new("Folder")
AutoSerde.Name = "AutoSerde"
AutoSerde.Parent = ReplicatedStorage
local RemoteEvent = Instance.new("RemoteEvent")
local RunService = game:GetService("RunService")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local IsServer = RunService:IsServer()
local NetworkObjectClient = {}
local NetworkObjectServer = {}
local InstanceProvider = {}
function NetworkObjectServer:Fire(...)