This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- impl | |
-- a wrapper for easily implementing properties and methods | |
-- in lune to mock roblox stuffs | |
local roblox = require("@lune/roblox") | |
export type GenericInstance<I> = roblox.Instance & I | |
type PropertySetter<I, P> = (instance: GenericInstance<I>, new_value: unknown) -> P |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--!native | |
-- duster | |
-- fast and lightweight maid impl ( thats also better than janitor ) | |
type Types = "table" | "function" | "thread" | "Instance" | "RBXScriptConnection" | |
type TableCleanupMethod = <V>(self: (V & {})) -> () | |
export type Cleanable = |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--!native | |
-- uuid | |
-- function for generating a uuid, based on https://gist.github.com/jrus/3197011 | |
local uuid_format = "%x%x%x%x%x%x%x%x-%x%x%x%x-4%x%x%x-%x%x%x%x-%x%x%x%x%x%x%x%x%x%x%x%x" | |
local wrap_in_curly_braces_format = "{%*}" | |
local string_format = string.format | |
local random_seed = math.randomseed | |
local random = math.random |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--!native | |
--!strict | |
-- Exp | |
-- Level and experience class modified from | |
-- https://rostrap.github.io/Libraries/Math/Leveler/ | |
-- @Kalrnlo | |
-- 20/03/2024 | |
local Players = game:GetService("Players") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--!native | |
-- abbrev timezone | |
-- simple function for getting a timezone in its abbreviated form | |
-- ie EST (Eastern Standard Time) | |
local GSUB = string.gsub | |
local DATE = os.date | |
local function abbrev_timezone(offset: number?): string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local function AssetTypeToAccesoryType(AssetType: Enum.AssetType): Enum.AccessoryType | |
local Success, EnumItem = pcall(function(EnumItemName) | |
return if Enum.AccessoryType[EnumItemName] ~= nil then Enum.AccessoryType[EnumItemName] else nil | |
end, string.split(AssetType.Name, "Acc")[1]) | |
return if Success then EnumItem else Enum.AccessoryType.Unknown | |
end | |
print(AssetTypeToAccesoryType(Enum.AssetType.WaistAccessory)) --> Enum.AccessoryType.Waist | |
print(AssetTypeToAccesoryType(Enum.AssetType.Hat)) --> Enum.AccessoryType.Hat |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--!strict | |
-- Caller | |
-- a simple signal alterative, thats a function that returns 2 functions | |
-- first is for adding a callback and returns a function to disconnect | |
-- second is for running the callbacks with the given values | |
-- inspired by bin from util.redblox.dev | |
-- 09/02/2024 | |
-- @Kalrnlo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type void = boolean? | |
event PlayerLoaded = { | |
from: Client, | |
type: Reliable, | |
call: SingleAsync, | |
data: void | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--!strict | |
-- GameJoinUrlUtil | |
-- A utility module for generation join links for any game | |
-- with url enocoding and launchdata encoding included | |
-- @Kalrnlo | |
-- 30/11/2023 | |
local HTTPService = game:GetService("HttpService") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--!strict | |
-- RichTextUtil | |
-- simple utility module for rich text | |
-- @Kalrnlo | |
-- 02/12/2023 | |
local RichTextUtil = {} | |
-- Taken from |
NewerOlder