repo stringclasses 254
values | file_path stringlengths 29 241 | code stringlengths 100 233k | tokens int64 14 69.4k |
|---|---|---|---|
Infinite-Store/Infinite-Store | Infinite-Store-Infinite-Store-87d0e48/plugins/partflashback.plugin.luau | local Plugin = {
["PluginName"] = "Part Flashback",
["PluginDescription"] = "Creates a part that you can teleport to",
["Commands"] = {
["partflashback"] = {
["ListName"] = "partflashback / pflash",
["Description"] = "Allows you to teleport to a part",
["Aliases"] = { "pflash" },
["Function"] = functio... | 346 |
Infinite-Store/Infinite-Store | Infinite-Store-Infinite-Store-87d0e48/plugins/plugininfo.plugin.luau | local Plugin = {
["PluginName"] = "Plugin Info",
["PluginDescription"] = "Displays information about your plugin usage.",
["Commands"] = {
["plugininfo"] = {
["ListName"] = "plugininfo / plugins",
["Description"] = "Displays information about your plugin usage.",
["Aliases"] = { "plugins" },
["Function... | 374 |
Infinite-Store/Infinite-Store | Infinite-Store-Infinite-Store-87d0e48/plugins/prediction.plugin.luau | local CmdSuggestion = Instance.new("TextLabel")
CmdSuggestion.Name = "CmdSuggestion"
CmdSuggestion.Parent = Cmdbar
CmdSuggestion.BackgroundTransparency = 1
CmdSuggestion.BorderSizePixel = 0
CmdSuggestion.Position = UDim2.new(0, 0, 0, 0)
CmdSuggestion.Size = UDim2.new(0, 240, 0, 25)
CmdSuggestion.Font = Enum.Font.Source... | 1,149 |
Infinite-Store/Infinite-Store | Infinite-Store-Infinite-Store-87d0e48/plugins/rename.plugin.luau | return {
["PluginName"] = "rename",
["PluginDescription"] = "Scripted by NoobSploit#0001",
["Commands"] = {
["rename"] = {
["ListName"] = "rename [text]",
["Description"] = "why",
["Aliases"] = {},
["Function"] = function(args, speaker)
if args[1] ~= nil then
Title.Text = getstring(1)
end
... | 112 |
Infinite-Store/Infinite-Store | Infinite-Store-Infinite-Store-87d0e48/plugins/schat.plugin.luau | local Plugin = {
["PluginName"] = "schat",
["PluginDescription"] = "Scripted by NoobSploit#0001",
["Commands"] = {
["schat"] = {
["ListName"] = "schat [text]",
["Description"] = "Chats in game.Players:Chat and can only be seen though chat logs",
["Aliases"] = {},
["Function"] = function(args, speaker)
... | 142 |
Infinite-Store/Infinite-Store | Infinite-Store-Infinite-Store-87d0e48/plugins/showhealth.plugin.luau | local Plugin = {
["PluginName"] = "Showhealth",
["PluginDescription"] = "Made by YuKii#4662",
["Commands"] = {
["health"] = {
["ListName"] = "health / hp [plr]",
["Description"] = "Show Player Health",
["Aliases"] = { "hp" },
["Function"] = function(args, speaker)
local players = getPlayer(args[1],... | 185 |
Infinite-Store/Infinite-Store | Infinite-Store-Infinite-Store-87d0e48/plugins/systemchat.plugin.luau | local Plugin = {
["PluginName"] = "System chat",
["PluginDescription"] = "Fake chat as a system",
["Commands"] = {
["systemchat"] = {
["ListName"] = "systemchat / schat [msg]",
["Description"] = "chat as a system",
["Aliases"] = { "schat" },
["Function"] = function(args, speaker)
local msg = " ... | 152 |
Infinite-Store/Infinite-Store | Infinite-Store-Infinite-Store-87d0e48/plugins/tfly.plugin.luau | TFlyEnabled = false
local Plugin = {
["PluginName"] = "Tween Fly",
["PluginDescription"] = "Basically smooth flying",
["Commands"] = {
["tfly"] = {
["ListName"] = "tfly [speed]",
["Description"] = "Enables tween fly",
["Aliases"] = {},
["Function"] = function(args, speaker)
TFlyEnabled = true
... | 973 |
Infinite-Store/Infinite-Store | Infinite-Store-Infinite-Store-87d0e48/plugins/tool.plugin.luau | local Wishes = {
["PluginName"] = "Activate Tool",
["PluginDescription"] = "Activates tool thats in players hand (loops) ",
["Commands"] = {
["activate"] = {
["ListName"] = "activate / acti",
["Description"] = "Begins to loop activate tool",
["Aliases"] = { "acti" },
["Function"] = function(args, speak... | 259 |
howmanysmall/modern-roblox-ts-template | howmanysmall-modern-roblox-ts-template-8515fd5/.lune/Classes/Errors/MissingError.luau | --!optimize 2
--!strict
local Error = require("@packages/Error")
export type MissingError = {
name: "MissingError",
message: string,
stack: string?,
}
type Static = typeof(Error) & {
new: (message: string) -> MissingError,
}
local MissingError: MissingError & Static = setmetatable({}, {__index = Error}) :: any
(... | 214 |
howmanysmall/modern-roblox-ts-template | howmanysmall-modern-roblox-ts-template-8515fd5/.lune/Classes/Errors/StrictTypeError.luau | --!optimize 2
--!strict
local Error = require("@packages/Error")
export type StrictTypeError = {
name: "StrictTypeError",
message: string,
stack: string?,
}
type Static = typeof(Error) & {
new: (message: string) -> StrictTypeError,
}
local StrictTypeError: StrictTypeError & Static = setmetatable({}, {__index = E... | 214 |
howmanysmall/modern-roblox-ts-template | howmanysmall-modern-roblox-ts-template-8515fd5/.lune/Classes/Errors/TypeError.luau | --!optimize 2
--!strict
local Error = require("@packages/Error")
export type TypeError = {
name: "TypeError",
message: string,
stack: string?,
}
type Static = typeof(Error) & {
new: (message: string) -> TypeError,
}
local TypeError: TypeError & Static = setmetatable({}, {__index = Error}) :: any;
(TypeError :: a... | 197 |
howmanysmall/modern-roblox-ts-template | howmanysmall-modern-roblox-ts-template-8515fd5/.lune/Classes/FileInstance.luau | --!optimize 2
--!strict
local PathFileSystem = require("@packages/PathFileSystem")
local PathUtilities = require("@utilities/PathUtilities")
local process = require("@lune/process")
export type FileInstance = {
FilePath: string,
IsDirectory: boolean,
Name: string,
Parent: FileInstance?,
GetChildren: (self: File... | 1,272 |
howmanysmall/modern-roblox-ts-template | howmanysmall-modern-roblox-ts-template-8515fd5/.lune/Classes/LRUCache.luau | --!optimize 2
--!strict
local GreenTea = require("@packages/GreenTea")
local LuauPolyfill = require("@packages/LuauPolyfill")
local Error = LuauPolyfill.Error
type Node<K, V> = {
Key: K,
Next: Node<K, V>?,
Previous: Node<K, V>?,
Value: V,
}
export type LRUCache<K, V> = typeof(setmetatable(
{} :: {
Capacity: ... | 2,934 |
howmanysmall/modern-roblox-ts-template | howmanysmall-modern-roblox-ts-template-8515fd5/.lune/Contexts/BrickColor/Colors.luau | --!optimize 2
--!strict
local Color3 = require("@contexts/Color3")
local SortedArray = require("@packages/SortedArray")
export type Color3 = Color3.PolyfillColor3
export type ColorData = {
Color3: Color3,
Name: string,
Number: number,
}
local function DeepCopy<T>(object: T): T
local new = table.clone(object :: n... | 7,698 |
howmanysmall/modern-roblox-ts-template | howmanysmall-modern-roblox-ts-template-8515fd5/.lune/Contexts/BrickColor/init.luau | --!optimize 2
--!strict
local Color3 = require("@contexts/Color3")
local LuauPolyfill = require("@packages/LuauPolyfill")
local TypeOf = require("@packages/TypeOf")
local Colors = require("@self/Colors")
local Error = LuauPolyfill.Error
local ColorData = Colors.ColorData
local SortedByName = Colors.SortedByName
loc... | 1,499 |
howmanysmall/modern-roblox-ts-template | howmanysmall-modern-roblox-ts-template-8515fd5/.lune/Contexts/Color3.luau | --!optimize 2
--!strict
export type PolyfillColor3 = {
R: number,
G: number,
B: number,
Lerp: (self: PolyfillColor3, color: PolyfillColor3, alpha: number) -> PolyfillColor3,
ToHSV: (self: PolyfillColor3) -> (number, number, number),
ToHex: (self: PolyfillColor3) -> string,
r: number,
g: number,
b: number,
}... | 1,540 |
howmanysmall/modern-roblox-ts-template | howmanysmall-modern-roblox-ts-template-8515fd5/.lune/Contexts/DateTime.luau | --!optimize 2
--!strict
--[[
MIT License
Copyright (c) 2024 BusyCityGuy
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy,... | 399 |
howmanysmall/modern-roblox-ts-template | howmanysmall-modern-roblox-ts-template-8515fd5/.lune/Contexts/Debug.luau | --!optimize 2
--!strict
--[[
MIT License
Copyright (c) 2024 BusyCityGuy
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy,... | 434 |
howmanysmall/modern-roblox-ts-template | howmanysmall-modern-roblox-ts-template-8515fd5/.lune/Contexts/Instance/Signal/FastDefer.luau | --!optimize 2
--!strict
local task = require("@lune/task")
local FreeThreads: {thread} = table.create(500)
local function RunFunction<Arguments...>(callback: (Arguments...) -> (), thread: thread, ...: Arguments...)
callback(...)
table.insert(FreeThreads, thread)
end
local function Yield()
while true do
RunFunct... | 184 |
howmanysmall/modern-roblox-ts-template | howmanysmall-modern-roblox-ts-template-8515fd5/.lune/Contexts/Instance/Signal/IsDeferred.luau | --!optimize 2
--!strict
local cached: boolean = nil
local function IsDeferred(): boolean
if cached ~= nil then
return cached
end
local success, value = pcall(function()
return game:GetService("Workspace").SignalBehavior.Name == "Deferred"
end)
if not success then
cached = false
return cached
end
cac... | 95 |
howmanysmall/modern-roblox-ts-template | howmanysmall-modern-roblox-ts-template-8515fd5/.lune/Contexts/Instance/Signal/init.luau | --!optimize 2
--!strict
local FastDefer = require("@self/FastDefer")
local IsDeferred = require("@self/IsDeferred")
local task = require("@lune/task")
local FreeRunnerThread: thread?
local function AcquireRunnerThreadAndCallEventHandler<Arguments...>(callback: (Arguments...) -> (), ...: Arguments...)
local acquired... | 3,153 |
howmanysmall/modern-roblox-ts-template | howmanysmall-modern-roblox-ts-template-8515fd5/.lune/Contexts/Instance/init.luau | --!optimize 2
--!strict
local Signal = require("@self/Signal")
local roblox = require("@lune/roblox")
local roblox_Instance_new = roblox.Instance.new
local Instance = setmetatable({
new = function(className: string, parent: roblox.Instance?)
if className == "BindableEvent" then
return Signal.new()
end
ret... | 103 |
howmanysmall/modern-roblox-ts-template | howmanysmall-modern-roblox-ts-template-8515fd5/.lune/Contexts/NumberRange.luau | --!optimize 2
--!strict
type Metatable = {
__eq: (self: PolyfillNumberRange, other: PolyfillNumberRange) -> boolean,
__tostring: (self: PolyfillNumberRange) -> string,
__type: "NumberRange",
}
export type PolyfillNumberRange = typeof(setmetatable({} :: {Max: number, Min: number}, {} :: Metatable))
type Static = {ne... | 429 |
howmanysmall/modern-roblox-ts-template | howmanysmall-modern-roblox-ts-template-8515fd5/.lune/Contexts/Random.luau | --!optimize 2
--!strict
export type PolyfillRandom = {
NextInteger: (self: PolyfillRandom, minimum: number, maximum: number) -> number,
NextNumber: ((self: PolyfillRandom, minimum: number, maximum: number) -> number)
& ((self: PolyfillRandom) -> number),
Shuffle: (self: PolyfillRandom, array: {any}) -> (),
}
type... | 334 |
howmanysmall/modern-roblox-ts-template | howmanysmall-modern-roblox-ts-template-8515fd5/.lune/Contexts/RaycastParams.luau | --!optimize 2
--!strict
local RaycastParams = {}
RaycastParams.__index = RaycastParams
RaycastParams.__type = "RaycastParams"
function RaycastParams.new()
return setmetatable({}, RaycastParams)
end
return table.freeze(RaycastParams)
| 60 |
howmanysmall/modern-roblox-ts-template | howmanysmall-modern-roblox-ts-template-8515fd5/.lune/Contexts/Unimplemented/Axes.luau | --!optimize 2
--!strict
type Metatable = {
__eq: (self: PolyfillAxes, other: PolyfillAxes) -> boolean,
__tostring: (self: PolyfillAxes) -> string,
__type: "Axes",
}
export type PolyfillAxes = typeof(setmetatable({} :: {}, {} :: Metatable))
type Static = {new: ((value: number) -> PolyfillAxes) & ((...any) -> Polyfil... | 200 |
howmanysmall/modern-roblox-ts-template | howmanysmall-modern-roblox-ts-template-8515fd5/.lune/Contexts/Unimplemented/CatalogSearchParams.luau | --!optimize 2
--!strict
type Metatable = {
__eq: (self: PolyfillCatalogSearchParams, other: PolyfillCatalogSearchParams) -> boolean,
__tostring: (self: PolyfillCatalogSearchParams) -> string,
__type: "CatalogSearchParams",
}
export type PolyfillCatalogSearchParams = typeof(setmetatable({} :: {}, {} :: Metatable))
t... | 213 |
howmanysmall/modern-roblox-ts-template | howmanysmall-modern-roblox-ts-template-8515fd5/.lune/Contexts/Unimplemented/ColorSequence.luau | --!optimize 2
--!strict
type Metatable = {
__eq: (self: PolyfillColorSequence, other: PolyfillColorSequence) -> boolean,
__tostring: (self: PolyfillColorSequence) -> string,
__type: "ColorSequence",
}
export type PolyfillColorSequence = typeof(setmetatable({} :: {}, {} :: Metatable))
type Static = {new: ((value: nu... | 212 |
howmanysmall/modern-roblox-ts-template | howmanysmall-modern-roblox-ts-template-8515fd5/.lune/Contexts/Unimplemented/Faces.luau | --!optimize 2
--!strict
type Metatable = {
__eq: (self: PolyfillFaces, other: PolyfillFaces) -> boolean,
__tostring: (self: PolyfillFaces) -> string,
__type: "Faces",
}
export type PolyfillFaces = typeof(setmetatable({} :: {}, {} :: Metatable))
type Static = {new: ((value: number) -> PolyfillFaces) & ((...any) -> P... | 200 |
howmanysmall/modern-roblox-ts-template | howmanysmall-modern-roblox-ts-template-8515fd5/.lune/Contexts/Unimplemented/NumberSequence.luau | --!optimize 2
--!strict
type Metatable = {
__eq: (self: PolyfillNumberSequence, other: PolyfillNumberSequence) -> boolean,
__tostring: (self: PolyfillNumberSequence) -> string,
__type: "NumberSequence",
}
export type PolyfillNumberSequence = typeof(setmetatable({} :: {}, {} :: Metatable))
type Static = {new: ((valu... | 212 |
howmanysmall/modern-roblox-ts-template | howmanysmall-modern-roblox-ts-template-8515fd5/.lune/Contexts/Unimplemented/OverlapParams.luau | --!optimize 2
--!strict
type Metatable = {
__eq: (self: PolyfillOverlapParams, other: PolyfillOverlapParams) -> boolean,
__tostring: (self: PolyfillOverlapParams) -> string,
__type: "OverlapParams",
}
export type PolyfillOverlapParams = typeof(setmetatable({} :: {}, {} :: Metatable))
type Static = {new: ((value: nu... | 215 |
howmanysmall/modern-roblox-ts-template | howmanysmall-modern-roblox-ts-template-8515fd5/.lune/Contexts/Unimplemented/Path2DControlPoint.luau | --!optimize 2
--!strict
type Metatable = {
__eq: (self: PolyfillPath2DControlPoint, other: PolyfillPath2DControlPoint) -> boolean,
__tostring: (self: PolyfillPath2DControlPoint) -> string,
__type: "Path2DControlPoint",
}
export type PolyfillPath2DControlPoint = typeof(setmetatable({} :: {}, {} :: Metatable))
type S... | 254 |
howmanysmall/modern-roblox-ts-template | howmanysmall-modern-roblox-ts-template-8515fd5/.lune/Contexts/Unimplemented/PhysicalProperties.luau | --!optimize 2
--!strict
type Metatable = {
__eq: (self: PolyfillPhysicalProperties, other: PolyfillPhysicalProperties) -> boolean,
__tostring: (self: PolyfillPhysicalProperties) -> string,
__type: "PhysicalProperties",
}
export type PolyfillPhysicalProperties = typeof(setmetatable({} :: {}, {} :: Metatable))
type S... | 213 |
howmanysmall/modern-roblox-ts-template | howmanysmall-modern-roblox-ts-template-8515fd5/.lune/Contexts/Utf8.luau | --!optimize 2
--!strict
local LunePolyfill = require("@packages/LunePolyfill")
local Utf8 = setmetatable({
graphemes = LunePolyfill.Utf8.Graphemes;
}, {__index = utf8})
return Utf8
| 56 |
howmanysmall/modern-roblox-ts-template | howmanysmall-modern-roblox-ts-template-8515fd5/.lune/Contexts/Vector3.luau | --!optimize 2
--!strict
local Enum = require("@packages/Enum")
export type PolyfillVector3 = typeof(setmetatable(
{} :: {
X: number,
Y: number,
Z: number,
Magnitude: number,
Unit: PolyfillVector3,
Dot: (self: PolyfillVector3, other: PolyfillVector3) -> number,
Cross: (self: PolyfillVector3, other: Po... | 2,369 |
howmanysmall/modern-roblox-ts-template | howmanysmall-modern-roblox-ts-template-8515fd5/.lune/Functions/GetArguments.luau | --!optimize 2
--!strict
local process = require("@lune/process")
local function GetArguments(): {string}
local arguments = process.args
local fixedArguments = table.create(#arguments - 1)
local length = 0
for index, value in arguments do
if index == 0 then
continue
end
length += 1
fixedArguments[len... | 100 |
howmanysmall/modern-roblox-ts-template | howmanysmall-modern-roblox-ts-template-8515fd5/.lune/Functions/GetAuthenticationCookie.luau | --!optimize 2
--!strict
local DotEnv = require("@packages/DotEnv")
local ExecuteUtilities = require("@utilities/ExecuteUtilities")
local process = require("@lune/process")
local roblox = require("@lune/roblox")
DotEnv.Load()
local function GetAuthenticationCookie(raw: boolean?): string?
if raw then
local fromApi =... | 248 |
howmanysmall/modern-roblox-ts-template | howmanysmall-modern-roblox-ts-template-8515fd5/.lune/Functions/GreenTeaAssert.luau | --!optimize 2
--!strict
local Error = require("@packages/Error")
local GreenTea = require("@packages/GreenTea")
export type Type = GreenTea.Type
export type ErrorLike = {
name: string,
message: string,
stack: string?,
[any]: any,
}
export type ErrorClassLike = typeof(setmetatable(
{} :: {
new: (message: string... | 227 |
howmanysmall/modern-roblox-ts-template | howmanysmall-modern-roblox-ts-template-8515fd5/.lune/Functions/RefreshVsCodeTasks.luau | --!optimize 2
--!strict
local Error = require("@packages/Error")
local ExecuteUtilities = require("@utilities/ExecuteUtilities")
local GreenTea = require("@packages/GreenTea")
local GreenTeaAssert = require("@functions/GreenTeaAssert")
local GreenTeaUtilities = require("@packages/GreenTeaUtilities")
local LuauPolyfill... | 1,820 |
howmanysmall/modern-roblox-ts-template | howmanysmall-modern-roblox-ts-template-8515fd5/.lune/Packages/Debug.luau | --!optimize 2
--!strict
local TypeOf = require("@packages/TypeOf")
local Debug = {}
local TAB = "\t"
type GenericDictionary = {[string]: any}
type GenericTable = {[any]: any}
local Inspect: (...unknown) -> string
local REPLACERS = {
["Index ?"] = "__index";
["Newindex ?"] = "__newindex";
}
local function GetErr... | 2,331 |
howmanysmall/modern-roblox-ts-template | howmanysmall-modern-roblox-ts-template-8515fd5/.lune/Packages/DotEnv.luau | --!optimize 2
--!strict
local LuauPolyfill = require("@packages/LuauPolyfill")
local PathFileSystem = require("@packages/PathFileSystem")
local RegEx = require("@lune/regex")
local process = require("@lune/process")
local Array = LuauPolyfill.Array
local Boolean = LuauPolyfill.Boolean.toJSBoolean
local String = LuauP... | 673 |
howmanysmall/modern-roblox-ts-template | howmanysmall-modern-roblox-ts-template-8515fd5/.lune/Packages/ES7Types.luau | --!optimize 2
--!strict
export type Object = {[string]: any}
export type Array<T> = {[number]: T}
export type Function = (...any) -> ...any
export type Table<T, V> = {[T]: V}
export type Tuple<T, V> = Array<T | V>
export type mapCallbackFn<K, V> = (element: V, key: K, map: Map<K, V>) -> ()
export type mapCallbackFnWit... | 833 |
howmanysmall/modern-roblox-ts-template | howmanysmall-modern-roblox-ts-template-8515fd5/.lune/Packages/Enum/CreateInRoblox.luau | --!native
--!optimize 2
--!strict
local ScriptEditorService = game:GetService("ScriptEditorService")
local Workspace = game:GetService("Workspace")
local function CreateItemType(enumName: string, enumNames: {string}): string
local stringBuilder = table.create(#enumNames)
for index, enumValue in enumNames do
strin... | 1,458 |
howmanysmall/modern-roblox-ts-template | howmanysmall-modern-roblox-ts-template-8515fd5/.lune/Packages/Enum/Enum.luau | --!nonstrict
--!optimize 2
local Debug = require("@packages/Debug")
local GreenTea = require("@packages/GreenTea")
local SortedArray = require("@packages/SortedArray")
local ErrorIndex = {}
function ErrorIndex:__index(index)
Debug.Error(`{index} is not a valid EnumItem`)
end
local ErrorIndex2 = {}
function ErrorInd... | 1,001 |
howmanysmall/modern-roblox-ts-template | howmanysmall-modern-roblox-ts-template-8515fd5/.lune/Packages/Enumeration/Enumeration.luau | --!nonstrict
--!optimize 2
local Debug = require("@packages/Debug")
local GreenTea = require("@packages/GreenTea")
local SortedArray = require("@packages/SortedArray")
local ErrorIndex = {}
function ErrorIndex:__index(index)
Debug.Error(`{index} is not a valid EnumerationItem`)
end
local ErrorIndex2 = {}
function E... | 1,028 |
howmanysmall/modern-roblox-ts-template | howmanysmall-modern-roblox-ts-template-8515fd5/.lune/Packages/Enumeration/init.luau | --!nonstrict
--!optimize 2
local Enumeration = require("@self/Enumeration")
type SimpleResult<T, E> = {
Success: true,
Value: T,
} | {
Success: false,
Error: E,
}
type EnumerationItem<Value, Type, Name = string> = {
EnumerationType: Type,
Name: Name,
Value: Value,
}
type EnumerationObject<Values, ArrayValues>... | 333 |
howmanysmall/modern-roblox-ts-template | howmanysmall-modern-roblox-ts-template-8515fd5/.lune/Packages/Error.luau | --!optimize 2
--!strict
type Function = (...any) -> ...any
--[=[
A JavaScript-style error object.
```lua
local function UsingConstructor()
-- You can use `Error.new`.
error(Error.new("Something went wrong!"))
end
local function UsingCall()
-- It supports `__call`.
error(Error("Something went wrong!"))
... | 1,224 |
howmanysmall/modern-roblox-ts-template | howmanysmall-modern-roblox-ts-template-8515fd5/.lune/Packages/Fmt/CreateFormatter.luau | --!optimize 2
--!strict
local Types = require("./Types")
local WriteFmt = require("./WriteFmt")
local INDENTATION = " "
local repeatCache: {[string]: {[number]: string}} = {}
local function StringRep(value: string, count: number)
local cache = repeatCache[value]
if not cache then
cache = {}
repeatCache[value... | 745 |
howmanysmall/modern-roblox-ts-template | howmanysmall-modern-roblox-ts-template-8515fd5/.lune/Packages/Fmt/Types.luau | --!optimize 2
--!strict
export type Formatter =
& ((method: "AsString") -> string)
& ((method: "AsTuple") -> ...unknown)
& ((method: "AddTable", object: unknown) -> ())
& ((method: "Lock") -> ())
& ((method: "Unlock") -> ())
& ((method: "AddToBuffer", value: unknown) -> ())
& ((method: "Indent") -> ())
& ((met... | 194 |
howmanysmall/modern-roblox-ts-template | howmanysmall-modern-roblox-ts-template-8515fd5/.lune/Packages/Fmt/WriteFmt.luau | --!optimize 2
--!strict
local LuauPolyfill = require("@packages/LuauPolyfill")
local Types = require("./Types")
local Error = LuauPolyfill.Error
type Formatter = Types.Formatter
local repeatCache: {[string]: {[number]: string}} = {}
local function StringRep(value: string, count: number)
local cache = repeatCache[v... | 2,442 |
howmanysmall/modern-roblox-ts-template | howmanysmall-modern-roblox-ts-template-8515fd5/.lune/Packages/Fmt/__tests__/Fmt.spek.luau | --!optimize 2
--!strict
local Fmt = require("@packages/Fmt")
local Spek = require("@packages/Spek")
return function(t: Spek.T)
local describe = t.describe
local expect = t.expect
local expectError = t.expectError
local it = t.it
local measure = t.measure
local operation = t.operation
describe("Fmt")(function(... | 2,255 |
howmanysmall/modern-roblox-ts-template | howmanysmall-modern-roblox-ts-template-8515fd5/.lune/Packages/Fmt/init.luau | --!optimize 2
--!strict
local CreateFormatter = require("@self/CreateFormatter")
type Static = typeof(setmetatable(
{} :: {
CreateFormatter: typeof(CreateFormatter),
Debugify: <T>(object: T, fmtFunction: (object: T, ...unknown) -> unknown) -> {[any]: any},
Fmt: (templateString: string, ...unknown) -> string,
... | 800 |
howmanysmall/modern-roblox-ts-template | howmanysmall-modern-roblox-ts-template-8515fd5/.lune/Packages/GreenTea/init.luau | --!optimize 2
--!strict
local GreenTea = require("@self/GreenTea")
local tCompat = require("@self/tCompat")
export type Cause = GreenTea.Cause
export type Type = GreenTea.Type
export type TuplePacked<T...> = GreenTea.TuplePacked<T...>
local export = {}
export.t = tCompat
export.isGreenTeaType = GreenTea.isGreenTea... | 789 |
howmanysmall/modern-roblox-ts-template | howmanysmall-modern-roblox-ts-template-8515fd5/.lune/Packages/GreenTea/tCompat.luau | --!optimize 2
--!strict
local GreenTea = require("./GreenTea")
local t = {}
type Typechecker = (...any) -> (boolean, any?)
type TypecheckerConstr<T... = ()> = (T...) -> Typechecker
local function asPlainFn(fn: (...any) -> ...any): Typechecker
return function()
return fn()
end
end
local function asGreenTeaType... | 1,879 |
howmanysmall/modern-roblox-ts-template | howmanysmall-modern-roblox-ts-template-8515fd5/.lune/Packages/GreenTeaUtilities.luau | --!optimize 2
--!strict
local DateTime = require("@lune/DateTime")
local Debug = require("@packages/Debug")
local Error = require("@packages/Error")
local GreenTea = require("@packages/GreenTea")
local LuauPolyfill = require("@packages/LuauPolyfill")
local TypeError = require("@errors/TypeError")
local instanceof = L... | 4,398 |
howmanysmall/modern-roblox-ts-template | howmanysmall-modern-roblox-ts-template-8515fd5/.lune/Packages/InstanceOf.luau | --!optimize 2
--!strict
-- polyfill for https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/instanceof
local __DEV__ = _G.__DEV__
-- FIXME Luau: typing class as Object gives: Type '{ @metatable {| __call: <a>(a, ...any) -> Error, __tostring: <b, c>({+ message: b, name: c +}) -> string |}, Erro... | 360 |
howmanysmall/modern-roblox-ts-template | howmanysmall-modern-roblox-ts-template-8515fd5/.lune/Packages/Int64.luau | --!optimize 2
--!strict
-- stylua: ignore
local HEX_TO_BINARY = {
["0"] = "0000", ["1"] = "0001", ["2"] = "0010", ["3"] = "0011",
["4"] = "0100", ["5"] = "0101", ["6"] = "0110", ["7"] = "0111",
["8"] = "1000", ["9"] = "1001", ["a"] = "1010", ["b"] = "1011",
["c"] = "1100", ["d"] = "1101", ["e"] = "1110... | 7,084 |
howmanysmall/modern-roblox-ts-template | howmanysmall-modern-roblox-ts-template-8515fd5/.lune/Packages/LuauDisk/None.luau | local None = table.freeze(setmetatable({}, {
__index = function()
error("attempt to index on None symbol")
end;
__tostring = function()
return "<None>"
end;
}))
return None
| 45 |
howmanysmall/modern-roblox-ts-template | howmanysmall-modern-roblox-ts-template-8515fd5/.lune/Packages/LuauDisk/WeakMap.luau | local WEAK_KEYS_METATABLE = {__mode = "k"}
local function WeakMap<K, V>(default: {[K]: V}?): {[K]: V}
local value = default or {}
return setmetatable(value :: any, WEAK_KEYS_METATABLE) :: any
end
return WeakMap
| 65 |
howmanysmall/modern-roblox-ts-template | howmanysmall-modern-roblox-ts-template-8515fd5/.lune/Packages/LuauDisk/array/all.luau | local function all<T>(array: {T}, predicate: (element: T, index: number) -> boolean): boolean
for index, element in array do
if not predicate(element, index) then
return false
end
end
return true
end
return all
| 61 |
howmanysmall/modern-roblox-ts-template | howmanysmall-modern-roblox-ts-template-8515fd5/.lune/Packages/LuauDisk/array/alternate.luau | local reduce = require("./reduce")
local function alternate<T, U>(array: {T}, ...: {U}): {any}
local alternateWith = {...}
if #alternateWith == 0 then
return array
end
local minimumLength = reduce(alternateWith, function(minimum: number, value)
return math.min(minimum, #value)
end, #array)
if minimumLengt... | 247 |
howmanysmall/modern-roblox-ts-template | howmanysmall-modern-roblox-ts-template-8515fd5/.lune/Packages/LuauDisk/array/any.luau | local function any<T>(array: {T}, predicate: (element: T, index: number) -> boolean): boolean
for index, element in array do
if predicate(element, index) then
return true
end
end
return false
end
return any
| 60 |
howmanysmall/modern-roblox-ts-template | howmanysmall-modern-roblox-ts-template-8515fd5/.lune/Packages/LuauDisk/array/average.luau | local function average(array: {number}): number?
local length = #array
if length == 0 then
return nil
end
local result = 0
for _, element in array do
result += element
end
return result / length
end
return average
| 59 |
howmanysmall/modern-roblox-ts-template | howmanysmall-modern-roblox-ts-template-8515fd5/.lune/Packages/LuauDisk/array/averageBy.luau | local function averageBy<T>(array: {T}, map: (T) -> number): number?
local length = #array
if length == 0 then
return nil
end
local result = 0
for _, element in array do
result += map(element)
end
return result / length
end
return averageBy
| 72 |
howmanysmall/modern-roblox-ts-template | howmanysmall-modern-roblox-ts-template-8515fd5/.lune/Packages/LuauDisk/array/concat.luau | local function concat<T>(array: {T}, ...: {T}?): {T}
local result = nil
for i = 1, select("#", ...) do
local concatWith = select(i, ...)
if concatWith ~= nil and #concatWith > 0 then
result = result or table.clone(array)
for _, element in concatWith do
table.insert(result, element)
end
end
end
... | 104 |
howmanysmall/modern-roblox-ts-template | howmanysmall-modern-roblox-ts-template-8515fd5/.lune/Packages/LuauDisk/array/contains.luau | local function contains<T>(array: {T}, element: T): boolean
for _, value in array do
if value == element then
return true
end
end
return false
end
return contains
| 47 |
howmanysmall/modern-roblox-ts-template | howmanysmall-modern-roblox-ts-template-8515fd5/.lune/Packages/LuauDisk/array/deduplicate.luau | local function deduplicate<T>(array: {T}): {T}
if #array == 0 then
return array
end
local removeIndexes = {}
local seenSet = {}
for index, element in array do
if seenSet[element] == nil then
seenSet[element] = true
else
table.insert(removeIndexes, index)
end
end
local totalIndexes = #removeInde... | 149 |
howmanysmall/modern-roblox-ts-template | howmanysmall-modern-roblox-ts-template-8515fd5/.lune/Packages/LuauDisk/array/deduplicateByKey.luau | local function deduplicateByKey<T, Comparable>(array: {T}, key: (T) -> Comparable): {T}
local removeIndexes = {}
local seenSet = {}
for index, element in array do
local elementKey = key(element)
if seenSet[elementKey] == nil then
seenSet[elementKey] = true
else
table.insert(removeIndexes, index)
end
... | 157 |
howmanysmall/modern-roblox-ts-template | howmanysmall-modern-roblox-ts-template-8515fd5/.lune/Packages/LuauDisk/array/filter.luau | local function filter<T>(array: {T}, predicate: (T, number) -> boolean): {T}
local new = {}
for i, element in array do
if predicate(element, i) then
table.insert(new, element)
end
end
return new
end
return filter
| 64 |
howmanysmall/modern-roblox-ts-template | howmanysmall-modern-roblox-ts-template-8515fd5/.lune/Packages/LuauDisk/array/find.luau | local function find<T>(array: {T}, predicate: (element: T, index: number) -> boolean, start: number?): T?
if start == nil or start == 1 then
for index, element in array do
if predicate(element, index) then
return element
end
end
else
local length = #array
for i = start, length do
local element = ... | 123 |
howmanysmall/modern-roblox-ts-template | howmanysmall-modern-roblox-ts-template-8515fd5/.lune/Packages/LuauDisk/array/findIndex.luau | local function findIndex<T>(array: {T}, predicate: (element: T, index: number) -> boolean, start: number?): number?
if start == nil or start == 1 then
for index, element in array do
if predicate(element, index) then
return index
end
end
else
local length = #array
for i = start, length do
local el... | 125 |
howmanysmall/modern-roblox-ts-template | howmanysmall-modern-roblox-ts-template-8515fd5/.lune/Packages/LuauDisk/array/findIndexByValue.luau | local function findIndexByValue<T>(array: {T}, element: T, start: number?): number?
return table.find(array, element, start)
end
return findIndexByValue
| 40 |
howmanysmall/modern-roblox-ts-template | howmanysmall-modern-roblox-ts-template-8515fd5/.lune/Packages/LuauDisk/array/findMap.luau | local function findMap<T, U>(array: {T}, mapFn: (element: T, index: number) -> U?, start: number?): U?
if start == nil or start == 1 then
for index, element in array do
local result = mapFn(element, index)
if result ~= nil then
return result
end
end
else
local length = #array
for i = start, lengt... | 144 |
howmanysmall/modern-roblox-ts-template | howmanysmall-modern-roblox-ts-template-8515fd5/.lune/Packages/LuauDisk/array/flatMap.luau | local isArray = require("./isArray")
local function flatMap<T, U>(array: {T}, mapFn: (T, number) -> nil | U | {U}): {U}
local new = {}
for i, element in array do
local value = mapFn(element, i)
if value ~= nil then
if isArray(value) then
for _, innerElement in value :: {U} do
table.insert(new, innerE... | 128 |
howmanysmall/modern-roblox-ts-template | howmanysmall-modern-roblox-ts-template-8515fd5/.lune/Packages/LuauDisk/array/flatten.luau | local isArray = require("./isArray")
local function flatten<T>(array: {T | {T}}, depth: number?): {T}
local actualDepth = if depth == nil then math.huge else depth
if actualDepth == 0 then
return array :: {T}
end
local new = {}
for _, element in array do
if isArray(element) then
local iter: {T} = if actu... | 149 |
howmanysmall/modern-roblox-ts-template | howmanysmall-modern-roblox-ts-template-8515fd5/.lune/Packages/LuauDisk/array/fromFn.luau | local function fromFn<T>(generator: (number) -> T?): {T}
local array = {}
local i = 1
while true do
local element = generator(i)
if element == nil then
break
else
i += 1
table.insert(array, element)
end
end
return array
end
return fromFn
| 78 |
howmanysmall/modern-roblox-ts-template | howmanysmall-modern-roblox-ts-template-8515fd5/.lune/Packages/LuauDisk/array/fromTryFn.luau | local function fromTryFn<T>(generator: (number) -> T?): {T}
local array = {}
local i = 1
while true do
local success, element = pcall(generator, i)
if success == false or element == nil then
break
else
i += 1
table.insert(array, element)
end
end
return array
end
return fromTryFn
| 89 |
howmanysmall/modern-roblox-ts-template | howmanysmall-modern-roblox-ts-template-8515fd5/.lune/Packages/LuauDisk/array/isArray.luau | local function isArray(value: unknown): boolean
if type(value) ~= "table" then
return false
end
local tableValue: {[any]: any} = value :: any
if next(tableValue) == nil then
-- an empty table is an empty array
return true
end
local length = #tableValue
if length == 0 then
return false
end
local ex... | 142 |
howmanysmall/modern-roblox-ts-template | howmanysmall-modern-roblox-ts-template-8515fd5/.lune/Packages/LuauDisk/array/isEmpty.luau | local function isEmpty(value: {[any]: any}): boolean
return next(value) == nil
end
return isEmpty
| 24 |
howmanysmall/modern-roblox-ts-template | howmanysmall-modern-roblox-ts-template-8515fd5/.lune/Packages/LuauDisk/array/map.luau | local function map<T, U>(array: {T}, mapFn: (T, number) -> U?): {U}
local new = {}
for i, element in array do
local value = mapFn(element, i)
if value ~= nil then
table.insert(new, value)
end
end
return new
end
return map
| 75 |
howmanysmall/modern-roblox-ts-template | howmanysmall-modern-roblox-ts-template-8515fd5/.lune/Packages/LuauDisk/array/maximum.luau | local function maximum(array: {number}, initialValue: number?): number
if initialValue == nil then
if #array == 0 then
error("initial value must be provided to Array.maximum when the array is empty")
end
initialValue = array[1]
end
local accumulator = initialValue :: number
for _, element in array do
ac... | 94 |
howmanysmall/modern-roblox-ts-template | howmanysmall-modern-roblox-ts-template-8515fd5/.lune/Packages/LuauDisk/array/maximumBy.luau | local function maximumBy<T>(array: {T}, map: (T) -> number, initialValue: number?): number
if initialValue == nil then
if #array == 0 then
error("initial value must be provided to Array.maximumBy when the array is empty")
end
initialValue = map(array[1])
end
local accumulator: number = initialValue :: numb... | 111 |
howmanysmall/modern-roblox-ts-template | howmanysmall-modern-roblox-ts-template-8515fd5/.lune/Packages/LuauDisk/array/minimum.luau | local function minimum(array: {number}, initialValue: number?): number
if initialValue == nil then
if #array == 0 then
error("initial value must be provided to Array.minimum when the array is empty")
end
initialValue = array[1]
end
local accumulator = initialValue :: number
for _, element in array do
ac... | 94 |
howmanysmall/modern-roblox-ts-template | howmanysmall-modern-roblox-ts-template-8515fd5/.lune/Packages/LuauDisk/array/minimumBy.luau | local function minimumBy<T>(array: {T}, map: (T) -> number, initialValue: number?): number
if initialValue == nil then
if #array == 0 then
error("initial value must be provided to Array.minimumBy when the array is empty")
end
initialValue = map(array[1])
end
local accumulator: number = initialValue :: numb... | 111 |
howmanysmall/modern-roblox-ts-template | howmanysmall-modern-roblox-ts-template-8515fd5/.lune/Packages/LuauDisk/array/partition.luau | local function partition<T>(array: {T}, predicate: (T, number) -> boolean): ({T}, {T})
local trueValues = {}
local falseValues = {}
for i, element in array do
if predicate(element, i) then
table.insert(trueValues, element)
else
table.insert(falseValues, element)
end
end
return trueValues, falseValues
e... | 89 |
howmanysmall/modern-roblox-ts-template | howmanysmall-modern-roblox-ts-template-8515fd5/.lune/Packages/LuauDisk/array/pop.luau | local function pop<T>(array: {T}, count: number?): {T}
local actualCount = count or 1
if actualCount == 1 then
local new = table.clone(array)
table.remove(new)
return new
elseif actualCount == 0 then
return array
else
local length = #array
local remaining = length - actualCount
if remaining <= 0 th... | 174 |
howmanysmall/modern-roblox-ts-template | howmanysmall-modern-roblox-ts-template-8515fd5/.lune/Packages/LuauDisk/array/popFirst.luau | local function popFirst<T>(array: {T}, count: number?): {T}
local actualCount = count or 1
if actualCount == 1 then
local new = table.clone(array)
table.remove(new, 1)
return new
elseif actualCount == 0 then
return array
else
local length = #array
local remaining = length - actualCount
if remaining... | 185 |
howmanysmall/modern-roblox-ts-template | howmanysmall-modern-roblox-ts-template-8515fd5/.lune/Packages/LuauDisk/array/product.luau | local function product(array: {number}, initialValue: number?): number
local result = if initialValue == nil then 1 else initialValue
for _, element in array do
result *= element
end
return result
end
return product
| 49 |
howmanysmall/modern-roblox-ts-template | howmanysmall-modern-roblox-ts-template-8515fd5/.lune/Packages/LuauDisk/array/productBy.luau | local function productBy<T>(array: {T}, map: (T) -> number, initialValue: number?): number
local result = if initialValue == nil then 1 else initialValue
for _, element in array do
result *= map(element)
end
return result
end
return productBy
| 62 |
howmanysmall/modern-roblox-ts-template | howmanysmall-modern-roblox-ts-template-8515fd5/.lune/Packages/LuauDisk/array/push.luau | local function push<T>(array: {T}, ...: T?): {T}
local newArray = table.clone(array)
for i = 1, select("#", ...) do
local element = select(i, ...)
if element ~= nil then
table.insert(newArray, element)
end
end
return newArray
end
return push
| 72 |
howmanysmall/modern-roblox-ts-template | howmanysmall-modern-roblox-ts-template-8515fd5/.lune/Packages/LuauDisk/array/range.luau | local function range<T>(array: {T}, from: number, to: number?): {T}
local length = #array
if length == 0 then
return array
end
local actualTo = if to == nil then length else to
local normalizedFrom = if from < 0 then 1 + (from + length) else from
local normalizedTo = if actualTo < 0 then 1 + (actualTo + length... | 192 |
howmanysmall/modern-roblox-ts-template | howmanysmall-modern-roblox-ts-template-8515fd5/.lune/Packages/LuauDisk/array/reduce.luau | local function reduce<T, A>(array: {T}, reducer: (accumulator: A, value: T, index: number) -> A, accumulator: A?): A
if accumulator == nil then
for index, value in array do
if index == 1 then
accumulator = value :: any
else
accumulator = reducer(accumulator :: A, value, index)
end
end
else
for ... | 223 |
howmanysmall/modern-roblox-ts-template | howmanysmall-modern-roblox-ts-template-8515fd5/.lune/Packages/LuauDisk/array/removeIndexes.luau | local removeSortedIndexes = require("./removeSortedIndexes")
local sort = require("./sort")
local function removeIndexes<T>(array: {T}, indexes: {number}): {T}
local removeLength = #indexes
local arrayLenth = #array
if removeLength == 0 or arrayLenth == 0 then
return array
end
local sortedIndexes = sort(index... | 96 |
howmanysmall/modern-roblox-ts-template | howmanysmall-modern-roblox-ts-template-8515fd5/.lune/Packages/LuauDisk/array/removeSortedIndexes.luau | local function removeSortedIndexes<T>(array: {T}, indexes: {number}): {T}
local removeLength = #indexes
local arrayLenth = #array
if removeLength == 0 or arrayLenth == 0 then
return array
end
local startFrom = nil
for i = removeLength, 1, -1 do
local index = indexes[i]
if index <= arrayLenth then
start... | 211 |
howmanysmall/modern-roblox-ts-template | howmanysmall-modern-roblox-ts-template-8515fd5/.lune/Packages/LuauDisk/array/removeValues.luau | local function removeValues<T>(array: {T}, ...: T?): {T}
local removeLength = select("#", ...)
local arrayLenth = #array
if removeLength == 0 or arrayLenth == 0 then
return array
end
local removeIndexes = {}
for index, element in array do
for i = 1, removeLength do
local value: T? = select(i, ...)
if... | 203 |
howmanysmall/modern-roblox-ts-template | howmanysmall-modern-roblox-ts-template-8515fd5/.lune/Packages/LuauDisk/array/reverse.luau | local function reverse<T>(array: {T}): {T}
local length = #array
if length < 2 then
return array
end
local newArray = table.clone(array)
for i = 1, math.floor(length / 2) do
local swapRight = length - i + 1
newArray[i], newArray[swapRight] = newArray[swapRight], newArray[i]
end
return newArray
end
re... | 95 |
howmanysmall/modern-roblox-ts-template | howmanysmall-modern-roblox-ts-template-8515fd5/.lune/Packages/LuauDisk/array/sort.luau | local function sort<T>(array: {T}, comparator: ((T, T) -> boolean)?): {T}
if #array <= 1 then
return array
end
local result = table.clone(array)
table.sort(result, comparator)
return result
end
return sort
| 59 |
howmanysmall/modern-roblox-ts-template | howmanysmall-modern-roblox-ts-template-8515fd5/.lune/Packages/LuauDisk/array/sortByKey.luau | local map = require("./map")
type KeyElement<K, V> = {key: K, element: V}
local function sortByKey<T, Comparable>(array: {T}, key: (T) -> Comparable): {T}
if #array <= 1 then
return array
end
local result: {KeyElement<Comparable, T>} = map(array, function(element)
return {
key = key(element);
element = e... | 153 |
howmanysmall/modern-roblox-ts-template | howmanysmall-modern-roblox-ts-template-8515fd5/.lune/Packages/LuauDisk/array/stepBy.luau | local function stepBy<T>(array: {T}, step: number): {T}
local length = #array
if step == 1 then
return array
elseif step == -1 then
local newArray = table.clone(array)
for i = 1, math.floor(length / 2) do
local swapRight = length - i + 1
newArray[i], newArray[swapRight] = newArray[swapRight], newArray... | 207 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.