Skip to content

Instantly share code, notes, and snippets.

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

howmanysmall

😎
pobam L+
  • 00:44 (UTC -06:00)
View GitHub Profile
9473567656,
13934778636,
5677059413,
7964908102,
7167502862,
10890146719,
9120652292,
7416424539,
9648474597,
10052561125,
{
"ExperienceMultiplier": 1
}
-- This is the original module, 7% slower with type checks on both, 14% without type checks.
--[[
Differences from the original:
Using metatables instead of a function returning a table.
Added Vector3, Color3, Vector2, and UDim2 support.
Deprecated BrickColors.
Changed the creation method from BitBuffer.Create to BitBuffer.new.
OPTIMIZED!
Added a ::Destroy method.
{
"ExperienceMultiplier": 1
}
const AXES = ["X" as const, "Y" as const, "Z" as const];
export default function axisIndexToVector3Property(axisIndex: number) {
return AXES[axisIndex];
}
--!optimize 2
--!strict
local fs = require("@lune/fs")
local process = require("@lune/process")
local stdio = require("@lune/stdio")
getfenv(1).Vector2 = {
new = function()
return {X = 0, Y = 0}
--!optimize 2
--!strict
local fs = require("@lune/fs")
local process = require("@lune/process")
local task = require("@lune/task")
local FileInstance = {}
FileInstance.__index = FileInstance
local function Constructor(FilePath: string, FileName: string?)
@howmanysmall
howmanysmall / React.lua
Created June 5, 2023 15:16
react bench
local HttpService = game:GetService("HttpService")
local React = require(script.Parent.Parent.Packages.Roact)
local tree
local function Component()
local value, setValue = React.useState("")
React.useEffect(function()
local connection = ReplicatedStorage:GetAttributeChangedSignal("Value"):Connect(setValue)
@howmanysmall
howmanysmall / can-backstab.lua
Last active April 6, 2023 16:14
determines if you can backstab
-- Compiled with roblox-ts v2.1.0
local NORMALIZER_VECTOR3 = Vector3.new(1, 0, 1)
local CanBackstab = function(attacker, victim)
local attackerHead = attacker:FindFirstChild("Head")
if attackerHead and attackerHead:IsA("BasePart") then
local victimHead = victim:FindFirstChild("Head")
if victimHead and victimHead:IsA("BasePart") then
local _exp = victim:GetPivot().Position * NORMALIZER_VECTOR3
local _arg0 = attacker:GetPivot().Position * NORMALIZER_VECTOR3
local attackerToVictim = (_exp - _arg0).Unit
local ReactRoblox = require("ReactRoblox")
local function mount(element: any, parent: any, key: string?): RoactHandle
if parent ~= nil and typeof(parent) ~= "Instance" then
error(string.format(
"Cannot mount element (`%s`) into a parent that is not a Roblox Instance (got type `%s`) \n%s",
if element then tostring(element.type) else "<unknown>",
typeof(parent),
if parent ~= nil then inspect(parent) else ""
))