Skip to content

Instantly share code, notes, and snippets.

View howmanysmall's full-sized avatar
😎
pobam L+

howmanysmall

😎
pobam L+
  • Utah
View GitHub Profile
local Immutable = require("Immutable")
local string_format = string.format
local string_find = string.find
local string_sub = string.sub
local tostring = tostring
local type = type
local NewMath = {}
local function AlwaysTrue()
return true
end
local function EqualObjects(...)
local FirstObject = select(1, ...)
for Index = 2, select("#", ...) do
if FirstObject ~= select(Index, ...) then
return false
--[[
DiscordHook by HydroNitrogen
Licenced under MIT
Copyright (c) 2019 Wendelstein7 (a.k.a. HydroNitrogen)
See: https://github.com/Wendelstein7/DiscordHook-CC
]]
--
local DiscordHook = {
Author = "HydroNitrogen";
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Resources = require(ReplicatedStorage:WaitForChild("Resources"))
local Promise = Resources.LoadLibrary("Promise")
local Scheduler = Resources.LoadLibrary("Scheduler")
local Scheduler_Wait = Scheduler.Wait
local TimeFunction = Scheduler.TimeFunction
local function PromiseChild(Parent, ChildName, Timeout)
return Promise.new(function(Resolve, Reject, OnCancel)
@howmanysmall
howmanysmall / WeebMaid.lua
Last active August 14, 2021 17:16
for those of you who hold the weeb card
-- WeebMaid
-- Original by Validark
-- Modifications by pobammer
-- roblox-ts support by OverHash and Validark
-- LinkToInstance fixed by Elttob.
local RunService = game:GetService("RunService")
local Promise = require(script.Parent.Promise)
local Heartbeat = RunService.Heartbeat
--!strict
-- Fork of https://github.com/Validark/Roblox-TS-Libraries/tree/master/delay-spawn-wait
-- This adds an equivalent to `spawn`, as well as `HeartbeatSpawn` and `ThreadSpawn`.
local RunService = game:GetService("RunService")
local Heartbeat = RunService.Heartbeat
type GenericFunction = (...any?) -> ...any?
type QueueFunction = BindableEvent | GenericFunction
-- parry this you stupid deferred mode
local RbxScriptConnection = {}
RbxScriptConnection.ClassName = "RBXScriptConnection"
RbxScriptConnection.__index = RbxScriptConnection
function RbxScriptConnection.new(BindableEvent, Function)
return setmetatable({
Connected = true;
local Fmt = require("Fmt") -- https://github.com/Nezuo/fmt, modified to make `.fmt` the __call function.
local Logger = {ClassName = "Logger"}
Logger.__index = Logger
local function FastSpawn(Function, ...)
local Arguments = table.pack(...)
local BindableEvent = Instance.new("BindableEvent")
BindableEvent.Event:Connect(function()
@howmanysmall
howmanysmall / getfenv replacement.lua
Created May 11, 2021 18:38
replaces `getfenv(2).script` or whatever
local function GetService(ServiceName: string)
return game:GetService(ServiceName)
end
local ServicesMetatable = {}
function ServicesMetatable:__index(Index)
local Success, Object = pcall(GetService, Index)
local Service = Success and Object
self[Index] = Service
return Service
--- Basic node interacting with the octree
-- @classmod OctreeNode
local OctreeNode = {ClassName = "OctreeNode"}
OctreeNode.__index = OctreeNode
function OctreeNode.new(Octree, Object)
return setmetatable({
Octree = Octree or error("No octree");
Object = Object or error("No object");