repo
stringclasses
302 values
file_path
stringlengths
18
241
language
stringclasses
2 values
file_type
stringclasses
4 values
code
stringlengths
76
697k
tokens
int64
10
271k
kohls-admin/kohls-admin
kohls-admin-kohls-admin-2413f1e/src/Client/UI/Theme/Themes/Light.luau
luau
.luau
return { Primary = Color3.fromRGB(255, 255, 255), PrimaryText = Color3.fromRGB(0, 0, 0), Secondary = Color3.fromRGB(0, 0, 0), SecondaryText = Color3.fromRGB(255, 255, 255), Border = Color3.fromRGB(191, 191, 191), Valid = Color3.fromRGB(0, 200, 0), Invalid = Color3.fromRGB(255, 0, 0), }
117
kohls-admin/kohls-admin
kohls-admin-kohls-admin-2413f1e/src/Client/UI/Theme/init.luau
luau
.luau
local Package = script.Parent.Parent.Parent local Flux = require(Package:WaitForChild("Flux")) local ThemesFolder = script:WaitForChild("Themes") local Default = require(script:WaitForChild("Default")) local compute = Flux.compute local state = Flux.state --- @within UI --- A directory of Flux state for UI component...
1,671
kohls-admin/kohls-admin
kohls-admin-kohls-admin-2413f1e/src/Client/UI/init.luau
luau
.luau
local Players = game:GetService("Players") local GuiService = game:GetService("GuiService") local TextService = game:GetService("TextService") local SoundService = game:GetService("SoundService") local UserInputService = game:GetService("UserInputService") local Package = script.Parent.Parent local Flux = require(Pac...
4,425
kohls-admin/kohls-admin
kohls-admin-kohls-admin-2413f1e/src/Client/UserFrame.luau
luau
.luau
local _K = require(script.Parent.Parent) local UI = require(script.Parent:WaitForChild("UI")) return function(from: number?, name: string?, image: string?, badgeEnabled: boolean?) local fromK = from :: any == "_K" if type(from) == "string" then if name == nil and from ~= "_K" then name = from end from = nil...
1,512
kohls-admin/kohls-admin
kohls-admin-kohls-admin-2413f1e/src/Client/init.client.luau
luau
.luau
local _K = require(script.Parent) local UI = _K.UI _K.Announce = require(script:WaitForChild("Announce")) _K.Notify = require(script:WaitForChild("Notify")) _K.LocalPlayer = _K.Service.Players.LocalPlayer _K.client = { Character = require(script:WaitForChild("Character")), Explorer = require(script:WaitForChild("E...
3,706
kohls-admin/kohls-admin
kohls-admin-kohls-admin-2413f1e/src/Server/LoadScript/Loadstring/FiOne.luau
luau
.luau
--!native --!optimize 2 --!nolint TableOperations --# selene: allow(multiple_statements, mixed_table) --[[ FiOne Copyright (C) 2021 Rerumu This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either vers...
8,236
kohls-admin/kohls-admin
kohls-admin-kohls-admin-2413f1e/src/Server/LoadScript/Loadstring/LuaU.luau
luau
.luau
--# selene: allow(incorrect_standard_library_use, multiple_statements, shadowing, unused_variable, empty_if, divide_by_zero, unbalanced_assignments) --[[-------------------------------------------------------------------- ldump.lua Save precompiled Lua chunks This file is part of Yueliang. Copyright (c) 2006 ...
3,123
kohls-admin/kohls-admin
kohls-admin-kohls-admin-2413f1e/src/Server/LoadScript/Loadstring/LuaX.luau
luau
.luau
--!nocheck --# selene: allow(incorrect_standard_library_use, multiple_statements, shadowing, unused_variable, empty_if, divide_by_zero, unbalanced_assignments) --[[-------------------------------------------------------------------- llex.lua Lua lexical analyzer in Lua This file is part of Yueliang. Copyright...
8,069
kohls-admin/kohls-admin
kohls-admin-kohls-admin-2413f1e/src/Server/LoadScript/Loadstring/LuaZ.luau
luau
.luau
--!nocheck --# selene: allow(incorrect_standard_library_use, multiple_statements, shadowing, unused_variable, empty_if, divide_by_zero, unbalanced_assignments) --[[-------------------------------------------------------------------- lzio.lua Lua buffered streams in Lua This file is part of Yueliang. Copyright...
1,057
kohls-admin/kohls-admin
kohls-admin-kohls-admin-2413f1e/src/Server/LoadScript/Loadstring/init.luau
luau
.luau
--!nolint BuiltinGlobalWrite --!nolint TableOperations --# selene: allow(incorrect_standard_library_use) --[[ Credit to einsteinK. Credit to Stravant for LBI. Credit to ccuser44 for proto conversion. Credit to the creators of all the other modules used in this. Sceleratis was here and decided modify some things. ...
1,180
kohls-admin/kohls-admin
kohls-admin-kohls-admin-2413f1e/src/Server/LoadScript/init.luau
luau
.luau
local ServerScriptService = game:GetService("ServerScriptService") local Loadstring = require(script.Loadstring) local FiOne = script.Loadstring.FiOne local BASE = { Client = script.ClientBase, Server = script.ServerBase, } local bytecodeCache = {} local function Bytecode(source: string) if bytecodeCache[source] ...
258
kohls-admin/kohls-admin
kohls-admin-kohls-admin-2413f1e/src/Server/Servers.luau
luau
.luau
local MessagingService = game:GetService("MessagingService") local Players = game:GetService("Players") local RunService = game:GetService("RunService") local THROTTLE = 15 local TOPIC = "_KAdminServers" local SERVER_ID = game.JobId ~= "" and game.JobId local Map: { [string]: { number } } = {} local Servers = { Cha...
597
kohls-admin/kohls-admin
kohls-admin-kohls-admin-2413f1e/src/Shared/Auth.luau
luau
.luau
local Shared = script.Parent local Data = require(Shared.Data:WaitForChild("Defaults")) local Hook = require(Shared:WaitForChild("Hook")) local Registry = require(Shared:WaitForChild("Registry")) local Util = require(Shared:WaitForChild("Util")) local Remote = Util.Remote export type Role = "everyone" | "vip" | "mod...
4,581
kohls-admin/kohls-admin
kohls-admin-kohls-admin-2413f1e/src/Shared/Data/ChunkChanges.luau
luau
.luau
local Http = game:GetService("HttpService") local LIMIT = 32 * 1000 - 32 -- 32 KB local function getNewData(chunk, size, key, action) local newSize = size if not chunk[key] then chunk[key] = {} newSize += #key + 5 -- "key":{} end local newInfo = chunk[key] if not newInfo[action] then newInfo[action] = {}...
455
kohls-admin/kohls-admin
kohls-admin-kohls-admin-2413f1e/src/Shared/Data/Defaults.luau
luau
.luau
local RunService = game:GetService("RunService") local Shared = script.Parent.Parent local Package = Shared.Parent local Theme = require(Package.Client:WaitForChild("UI"):WaitForChild("Theme")) local Z = require(Package:WaitForChild("Z")) type Dict = { [any]: any } Z.TRIM_STRINGS = true local Schema = {} Schema.l...
860
kohls-admin/kohls-admin
kohls-admin-kohls-admin-2413f1e/src/Shared/Data/Migrate/KAI.luau
luau
.luau
local DataStoreService = game:GetService("DataStoreService") local HttpService = game:GetService("HttpService") local Data = require(script.Parent.Parent:WaitForChild("Defaults")) local Util = require(script.Parent.Parent.Parent:WaitForChild("Util")) local function deserializeItem(data: string) local result = {} fo...
654
kohls-admin/kohls-admin
kohls-admin-kohls-admin-2413f1e/src/Shared/Data/Migrate/init.luau
luau
.luau
return { KAI = require(script:WaitForChild("KAI")), Settings = require(script:WaitForChild("Settings")) }
27
kohls-admin/kohls-admin
kohls-admin-kohls-admin-2413f1e/src/Shared/Data/Store.luau
luau
.luau
local DataStoreService = game:GetService("DataStoreService") local RunService = game:GetService("RunService") local Util = require(script.Parent.Parent:WaitForChild("Util")) local Store = { dataStore = nil :: DataStore?, } function Store.getBudget(requestType: Enum.DataStoreRequestType) return DataStoreService:Get...
569
kohls-admin/kohls-admin
kohls-admin-kohls-admin-2413f1e/src/Shared/Data/init.luau
luau
.luau
-- have global datastore toggle -- use queues? -- debounce update async -- eventually save player profiles as well as two main global datastores -- TODO: make sure cache is valid json encoding by sanitizing key inputs as strings always local Http = game:GetService("HttpService") local Players = game:GetService("Player...
5,497
kohls-admin/kohls-admin
kohls-admin-kohls-admin-2413f1e/src/Shared/DefaultAddons/Legacy.luau
luau
.luau
local legacyRoles = { { group = "GameCreator", role = "creator", }, { group = "Creator", role = "superadmin", }, { group = "SuperAdmin", role = "admin", }, { group = "Administration", role = "mod", }, { group = "Administration", role = "vip", }, } return function(_K) for index, definitio...
2,585
kohls-admin/kohls-admin
kohls-admin-kohls-admin-2413f1e/src/Shared/DefaultCommands/Administration.luau
luau
.luau
-- dangerous admin commands reserved for admin role or above return { { name = "announce", description = "Shows a message to everyone in the game, saves and shows to new users until it has been cleared.", args = { { type = "string", name = "Message", description = "The message to send.", }, ...
3,185
kohls-admin/kohls-admin
kohls-admin-kohls-admin-2413f1e/src/Shared/DefaultCommands/Fun.luau
luau
.luau
-- potentially abusive fun commands, moderator+ default return { { name = "disco", aliases = { "🪩", "un🪩", "undisco" }, description = "It's time to party! 🎉", env = function(_K) local env = { id = false, restore = false } function env.cleanup() if env.restore then _K.Service.Lighting.Ambient...
14,383
kohls-admin/kohls-admin
kohls-admin-kohls-admin-2413f1e/src/Shared/DefaultCommands/SuperAdmin.luau
luau
.luau
-- dangerous commands restricted to superadmins local Util = require(script.Parent.Parent:WaitForChild("Util")) return { { name = "badge", aliases = { "awardbadge", "givebadge" }, description = "Awards a badge to one or more player(s).", args = { { type = "players", name = "Player(s)", descrip...
4,601
kohls-admin/kohls-admin
kohls-admin-kohls-admin-2413f1e/src/Shared/DefaultCommands/Utility.luau
luau
.luau
-- safe utilily commands for all players return { { name = "version", description = "Displays the version of Kohl's Admin in this game.", optionalPrefix = true, runClient = function(context) context._K.Notify({ From = "_K", Text = `<sc>version</sc>:\t<b>{context._K.VERSION}</b>` }) end, }, { name = "...
10,198
kohls-admin/kohls-admin
kohls-admin-kohls-admin-2413f1e/src/Shared/DefaultTypes/Ban.luau
luau
.luau
local _K local function parseBan(input) local query = string.lower(input) for userId, ban in _K.Data.bans do local name = ban[1] if (name and string.find(string.lower(name), query, 1, true) == 1) or string.find(string.lower(userId), query, 1, true) == 1 then return userId end end if tonumber(inpu...
539
kohls-admin/kohls-admin
kohls-admin-kohls-admin-2413f1e/src/Shared/DefaultTypes/Color.luau
luau
.luau
local _K local COLORS = { ["0,0,0"] = Color3.new(0, 0, 0), ["255,255,255"] = Color3.new(1, 1, 1), ["#000"] = Color3.new(0, 0, 0), ["#fff"] = Color3.new(1, 1, 1), red = Color3.new(1, 0, 0), orange = Color3.new(1, 0.5, 0), yellow = Color3.new(1, 1, 0), yellowgreen = Color3.new(0.5, 1, 0), green = Color3.new(0,...
1,149
kohls-admin/kohls-admin
kohls-admin-kohls-admin-2413f1e/src/Shared/DefaultTypes/Command.luau
luau
.luau
return function(_K) local commandType = { transform = function(text) local query = string.lower(text) local exactMatch = _K.Registry.commands[query] if exactMatch and exactMatch.LocalPlayerAuthorized then return exactMatch end for key, command in _K.Registry.commands do if not command.LocalPla...
326
kohls-admin/kohls-admin
kohls-admin-kohls-admin-2413f1e/src/Shared/DefaultTypes/Emote.luau
luau
.luau
local AvatarEditorService = game:GetService("AvatarEditorService") local InsertService = game:GetService("InsertService") local MarketplaceService = game:GetService("MarketplaceService") local RunService = game:GetService("RunService") local Util = require(script.Parent.Parent:WaitForChild("Util")) local Remote = Uti...
1,516
kohls-admin/kohls-admin
kohls-admin-kohls-admin-2413f1e/src/Shared/DefaultTypes/Image.luau
luau
.luau
local _K local imageType = { filterLog = true, transform = function(v) return if v == "" then 0 else tonumber(v) end, validate = function(v) return v ~= nil and v == math.floor(v), "Only whole numbers are valid" end, parse = function(v, self) local texture = _K.Util.getTexture(v, _K.IsClient) if texture ...
213
kohls-admin/kohls-admin
kohls-admin-kohls-admin-2413f1e/src/Shared/DefaultTypes/Member.luau
luau
.luau
local _K = nil local function parseMember(input: string, self: any): string? local query = string.lower(input) local fromString = tostring(self.command.from) if input == "" or input == "me" and _K.Data.members[fromString] then return self._K.Auth.targetUserArgument(self, self.command.from, fromString) end loc...
796
kohls-admin/kohls-admin
kohls-admin-kohls-admin-2413f1e/src/Shared/DefaultTypes/Player/Types/All.luau
luau
.luau
local Players = game:GetService("Players") local generateValidate = require(script.Parent.Parent:WaitForChild("generateValidate")) local function allParse(arg, self) local feedback = {} local players = {} for _, player in Players:GetPlayers() do local message player, message = self._K.Auth.targetUserArgument(s...
230
kohls-admin/kohls-admin
kohls-admin-kohls-admin-2413f1e/src/Shared/DefaultTypes/Player/Types/Inverse.luau
luau
.luau
local Players = game:GetService("Players") -- TODO: finish inverse type local _typeInverse = { postParse = function(arg, self) local players = {} if type(arg) == "table" then for _, player in Players:GetPlayers() do local matched for _, player2 in arg do if player == player2 then matched = ...
272
kohls-admin/kohls-admin
kohls-admin-kohls-admin-2413f1e/src/Shared/DefaultTypes/Player/Types/Others.luau
luau
.luau
local Players = game:GetService("Players") local generateValidate = require(script.Parent.Parent:WaitForChild("generateValidate")) local function othersParse(arg, self) local feedback = {} local players = {} for _, player in Players:GetPlayers() do if player == self.command.fromPlayer then continue end lo...
232
kohls-admin/kohls-admin
kohls-admin-kohls-admin-2413f1e/src/Shared/DefaultTypes/Player/Types/Random.luau
luau
.luau
local Players = game:GetService("Players") local generateValidate = require(script.Parent.Parent:WaitForChild("generateValidate")) local function parseRandom(arg, self) arg = if arg == "" then 1 else tonumber(arg) if not arg or math.floor(arg) ~= arg then return nil, "Invalid integer" end local feedback = {} ...
294
kohls-admin/kohls-admin
kohls-admin-kohls-admin-2413f1e/src/Shared/DefaultTypes/Player/Types/Role.luau
luau
.luau
local Players = game:GetService("Players") local generateValidate = require(script.Parent.Parent:WaitForChild("generateValidate")) return function(_K) local function roleParse(arg, self) local feedback = {} local players, valid = {}, false for roleId in _K.Data.roles do if string.find(string.lower(roleId ::...
407
kohls-admin/kohls-admin
kohls-admin-kohls-admin-2413f1e/src/Shared/DefaultTypes/Player/Types/Team.luau
luau
.luau
local Teams = game:GetService("Teams") local generateValidate = require(script.Parent.Parent:WaitForChild("generateValidate")) return function(_K) local function teamParse(arg, self) local feedback = {} local players, valid = {}, false for _, team in Teams:GetTeams() do if string.find(string.lower(team.Name...
316
kohls-admin/kohls-admin
kohls-admin-kohls-admin-2413f1e/src/Shared/DefaultTypes/Player/generateValidate.luau
luau
.luau
local function generateValidate(validate) return function(v, self) local ok, feedback = validate(v, self) return ok, feedback or "Invalid player" end end return generateValidate
41
kohls-admin/kohls-admin
kohls-admin-kohls-admin-2413f1e/src/Shared/DefaultTypes/Player/init.luau
luau
.luau
local Players = game:GetService("Players") local generateValidate = require(script:WaitForChild("generateValidate")) local Types = script:WaitForChild("Types") -- TODO: post random selector? "%blue team~5" -- FIX: add a default description for autocompleting prefixes! local _K = nil --[[ ! - inverse match * - al...
1,862
kohls-admin/kohls-admin
kohls-admin-kohls-admin-2413f1e/src/Shared/DefaultTypes/Primitives.luau
luau
.luau
local _K local function notNil(v) return v ~= nil, "Invalid value" end local function startMatch(list: { string }, v) for _, match in list do local vStart, vEnd = string.find(match, v, 1, true) if vStart == 1 and vEnd > 0 then return true end end return false end local yes, no = { "+", "true", "yes", "e...
700
kohls-admin/kohls-admin
kohls-admin-kohls-admin-2413f1e/src/Shared/DefaultTypes/ReservedServer.luau
luau
.luau
local _K local function parse(input: string, self: any): (boolean, string?) local exact = _K.Data.reservedServers[input] if exact then return exact end local query, partial = string.lower(input) for reservedCode, data in _K.Data.reservedServers do local match = string.lower(reservedCode) if match == query t...
248
kohls-admin/kohls-admin
kohls-admin-kohls-admin-2413f1e/src/Shared/DefaultTypes/Role.luau
luau
.luau
return function(context) local _K = context local function roleIdSort(a, b) return _K.Data.roles[a[1]]._rank > _K.Data.roles[b[1]]._rank end local function roleParse(input: string, self: any) local query = string.lower(input) local rank = _K.Auth.getRank(self.command.from) for roleId, role in _K.Data.role...
335
kohls-admin/kohls-admin
kohls-admin-kohls-admin-2413f1e/src/Shared/DefaultTypes/Team.luau
luau
.luau
local Teams = game:GetService("Teams") local _K local typeTeam = { validate = function(input: string, from: number): (boolean, string?) local query = string.lower(input) local teams = Teams:GetTeams() if #teams == 0 then return false, "No teams available" end for _, team in teams do if string.find(st...
269
kohls-admin/kohls-admin
kohls-admin-kohls-admin-2413f1e/src/Shared/DefaultTypes/Time.luau
luau
.luau
local TIME_PATTERN = "(%d+%.?%d*)%s*(%a+)" local suggestedUnits = { "second", "minute", "hour", "day", "week", "month", "year", "millisecond", "s", "m", "h", "d", "w", "y", "hr", "wk", "yr", "ms", } local pluralUnits = {} local defaultSuggestions = { { "0", "0 Session" }, { "-1", "-1 Forever" } } f...
698
kohls-admin/kohls-admin
kohls-admin-kohls-admin-2413f1e/src/Shared/DefaultTypes/Tool.luau
luau
.luau
local _K local tools = {} local typeTool = { validate = function(input: string, from: number): (boolean, string?) local query = string.lower(input) for _, tool in tools do if string.find(string.lower(tool.Name), query, 1, true) == 1 then return true end end return false, "Invalid tool" end, parse ...
839
kohls-admin/kohls-admin
kohls-admin-kohls-admin-2413f1e/src/Shared/DefaultTypes/Vector.luau
luau
.luau
local function validateVector(value, i) if value == nil then return false, `Invalid or missing number at position {i} in Vector type.` end return true end return function(context) local vector3Type = context.Registry.makeSequenceType({ validate = validateVector, transform = tonumber, constructor = Vector3....
146
kohls-admin/kohls-admin
kohls-admin-kohls-admin-2413f1e/src/Shared/Hook.luau
luau
.luau
local Util = require(script.Parent:WaitForChild("Util")) --- @class Hook local Hook = { log = Util.Signal.new(), commandRegistered = Util.Signal.new(), preCommand = Util.Signal.new(), postCommand = Util.Signal.new(), runPreparedCommands = Util.Signal.new(), ban = Util.Signal.new(), unban = Util.Signal.new(), r...
163
kohls-admin/kohls-admin
kohls-admin-kohls-admin-2413f1e/src/Shared/Process/Argument.luau
luau
.luau
-- TODO: need to refactor this to make autocomplete easier hahahahaha ;( local Argument = {} Argument.__index = Argument function Argument.parseTypeUnion(rawType: string, rawArg: string) local split = string.split(rawType, " ") -- Check prefixes in order from longest to shortest local types = {} for i = 1, #spli...
1,242
kohls-admin/kohls-admin
kohls-admin-kohls-admin-2413f1e/src/Shared/Process/Command.luau
luau
.luau
local Players = game:GetService("Players") local Shared = script.Parent.Parent local Auth = require(Shared:WaitForChild("Auth")) local Argument = require(script.Parent:WaitForChild("Argument")) local Util = require(Shared:WaitForChild("Util")) local Type = require(Shared:WaitForChild("Type")) local Command = { Argu...
1,999
kohls-admin/kohls-admin
kohls-admin-kohls-admin-2413f1e/src/Shared/Process/init.luau
luau
.luau
--!optimize 2 --!native local Shared = script.Parent local Auth = require(Shared:WaitForChild("Auth")) local Data = require(Shared.Data:WaitForChild("Defaults")) local Hook = require(Shared:WaitForChild("Hook")) local Registry = require(Shared:WaitForChild("Registry")) local Util = require(Shared:WaitForChild("Util")...
2,573
kohls-admin/kohls-admin
kohls-admin-kohls-admin-2413f1e/src/Shared/Registry.luau
luau
.luau
local Players = game:GetService("Players") local RunService = game:GetService("RunService") local Hook = require(script.Parent:WaitForChild("Hook")) local Util = require(script.Parent:WaitForChild("Util")) local Type = require(script.Parent:WaitForChild("Type")) --- @within Registry --- @prop types { [string]: Argume...
1,970
kohls-admin/kohls-admin
kohls-admin-kohls-admin-2413f1e/src/Shared/Type.luau
luau
.luau
export type Dict = { [any]: any } export type Environment = {} | (_K: any) -> {} --- @within Registry --- @type ArgumentFunction (value: any, from: Player) -> ...any export type ArgumentFunction = (value: any, from: Player) -> ...any --- @within Registry --- @type ArgumentType {name: string, displayName: string?, li...
476
kohls-admin/kohls-admin
kohls-admin-kohls-admin-2413f1e/src/Shared/Util/Defer.luau
luau
.luau
local defaultBudget, expireTime = 1 / 240, 0 local Defer = {} -- Call at start of process to prevent unnecessarily waiting. function Defer.reset(budget: number?) expireTime = tick() + (defaultBudget or budget) end function Defer.wait(budget: number?) if tick() >= expireTime then task.wait() Defer.reset(budget)...
93
kohls-admin/kohls-admin
kohls-admin-kohls-admin-2413f1e/src/Shared/Util/Function.luau
luau
.luau
local Function = {} function Function.debounce(delay: number, func: (...any) -> ...any) local thread return function(...) if typeof(thread) == "thread" and coroutine.status(thread) == "suspended" then task.cancel(thread) end thread = task.delay(delay, func, ...) end end function Function.throttle(delay: n...
205
kohls-admin/kohls-admin
kohls-admin-kohls-admin-2413f1e/src/Shared/Util/Humanoid.luau
luau
.luau
local Humanoid = {} local properties = { "Head", "Face", "Shirt", "Pants", "GraphicTShirt", "HeadColor", "LeftArmColor", "LeftLegColor", "RightArmColor", "RightLegColor", "TorsoColor", } local particles = { "_KFire", "_KSmoke", "_KSparkles", "_KLight", "_KParticleEffect" } function Humanoid.applyDescriptio...
681
kohls-admin/kohls-admin
kohls-admin-kohls-admin-2413f1e/src/Shared/Util/Logger.luau
luau
.luau
--- @within Logger --- @type LogType "INFO" | "WARN" | "ERROR" | "DEBUG" | "CHAT" | "COMMAND" | "PURCHASE" | "DAMAGE" | "DEATH" | "KILL" | "JOIN" | "LEAVE" | string export type LogType = "INFO" | "WARN" | "ERROR" | "DEBUG" | "CHAT" | "COMMAND" | "PURCHASE" | "DAMAGE" | "DEATH" | "KILL" | "JOIN" | "LEAVE" |...
555
kohls-admin/kohls-admin
kohls-admin-kohls-admin-2413f1e/src/Shared/Util/MemoryStore.luau
luau
.luau
local module = {} function module.getItemsFromHashMap(hashMap: MemoryStoreHashMap): { [string]: any } local items = {} local pages = hashMap:ListItemsAsync(200) while true do for _, entry in pages:GetCurrentPage() do items[entry.key] = entry.value end if pages.IsFinished then break end pages:Advanc...
99
kohls-admin/kohls-admin
kohls-admin-kohls-admin-2413f1e/src/Shared/Util/Property.luau
luau
.luau
local Property = {} -- originalValue, overrideValue, propertyChangedConnection, internalChange local overrideCache = {} Property.cache = overrideCache function Property.override(instance: Instance, property: string, value: any) local overrides = overrideCache[instance] if not overrides then overrides = {} overr...
367
kohls-admin/kohls-admin
kohls-admin-kohls-admin-2413f1e/src/Shared/Util/Queue.luau
luau
.luau
--!strict local Queue = {} Queue.__index = Queue export type Queue<T> = typeof(setmetatable( {} :: { _first: number, _last: number, _queue: { T }, }, Queue )) function Queue.new<T>(): Queue<T> local self = setmetatable({ _first = 0, _last = -1, _queue = {}, }, Queue) return self end -- Check if th...
252
kohls-admin/kohls-admin
kohls-admin-kohls-admin-2413f1e/src/Shared/Util/Retry.luau
luau
.luau
--[[ Retries a function with exponential backoff until it succeeds or exceeds the maximum number of attempts. @param callback: () -> any | nil -- The function to retry @param attempts: number -- Number of retry attempts (Default: 5) @param base: number? -- Backoff delay exponent base, adds a delay of `base ^ attempts` ...
218
kohls-admin/kohls-admin
kohls-admin-kohls-admin-2413f1e/src/Shared/Util/Rollout.luau
luau
.luau
local datePattern = "(%d%d%d%d)%-(%d%d)%-(%d%d)" local FFlags = nil local Rollout = {} Rollout.__index = Rollout function Rollout.new(start, finish, key, seed, curve) local startYear, startMonth, startDay = string.match(start, datePattern) local finishYear, finishMonth, finishDay = string.match(finish, datePattern...
336
kohls-admin/kohls-admin
kohls-admin-kohls-admin-2413f1e/src/Shared/Util/RunContext.luau
luau
.luau
--!strict local UserInputService = game:GetService("UserInputService") local GuiService = game:GetService("GuiService") local RunService = game:GetService("RunService") local VRService = game:GetService("VRService") local isEdit = false local isServer = RunService:IsServer() local isClient = RunService:IsClient() loc...
217
kohls-admin/kohls-admin
kohls-admin-kohls-admin-2413f1e/src/Shared/Util/SafePlayerAdded.luau
luau
.luau
--!strict local Players = game:GetService("Players") type PlayerSet = { [Player]: boolean } local cache: { [PlayerSet]: RBXScriptConnection } = {} Players.PlayerRemoving:Connect(function(player) for processed, connection in cache do if connection and connection.Connected then processed[player] = nil else ...
187
kohls-admin/kohls-admin
kohls-admin-kohls-admin-2413f1e/src/Shared/Util/SafeTeleport.luau
luau
.luau
local TeleportService = game:GetService("TeleportService") local ATTEMPT_LIMIT = 5 local RETRY_DELAY = 1 local FLOOD_DELAY = 15 local function SafeTeleport(placeId, players, options) local attemptIndex = 0 local success, result -- define pcall results outside of loop so results can be reported later on repeat s...
341
kohls-admin/kohls-admin
kohls-admin-kohls-admin-2413f1e/src/Shared/Util/Service.luau
luau
.luau
local Service = setmetatable({ Asset = game:GetService("AssetService"), AvatarEditor = game:GetService("AvatarEditorService"), Badge = game:GetService("BadgeService"), Collection = game:GetService("CollectionService"), ContextAction = game:GetService("ContextActionService"), Group = game:GetService("GroupService"...
376
kohls-admin/kohls-admin
kohls-admin-kohls-admin-2413f1e/src/Shared/Util/Signal.luau
luau
.luau
--!strict --!optimize 2 --- @class Signal --- A performant, doubly linked-list implementation of the Observer pattern. type Function = (...any) -> () export type Connection = { Connected: boolean?, Disconnect: (self: Connection) -> (), _signal: Signal?, _next: Connection?, _prev: Connection?, _callback: Functi...
726
kohls-admin/kohls-admin
kohls-admin-kohls-admin-2413f1e/src/Shared/Util/Suggest.luau
luau
.luau
--!optimize 2 --!native local String = require("./String") local Table = require("./Table") local Suggest = {} function Suggest.getNames(objects: any): { string } local names = {} local existing = {} for key, object in objects do local name = object.Name or object.name or tostring(object) if existing[name] th...
918
kohls-admin/kohls-admin
kohls-admin-kohls-admin-2413f1e/src/Shared/Util/Table.luau
luau
.luau
export type Dict = { [any]: any } export type List = { any } local Table = {} function Table.concat(array: List, delimiter: string): string local strings = {} for _, item in array do table.insert(strings, tostring(item)) end return table.concat(strings, delimiter) end function Table.countKeys(t: Dict): number ...
701
kohls-admin/kohls-admin
kohls-admin-kohls-admin-2413f1e/src/Shared/Util/Tasks.luau
luau
.luau
--- A utility for managing concurrent tasks and awaiting their completion. --- @class Tasks local Tasks = {} Tasks.__index = Tasks type self = { _numTasks: number, _results: { any }, _returnFirstResult: boolean, _running: thread, _waiting: boolean, } export type Tasks = typeof(setmetatable({} :: self, Tasks)) -...
457
kohls-admin/kohls-admin
kohls-admin-kohls-admin-2413f1e/src/Shared/Util/Time.luau
luau
.luau
local Time = { UNITS = table.freeze({ { 1 / 1000, "millisecond" }, { 1, "second" }, { 60, "minute" }, { 60 * 60, "hour", "hr" }, { 60 * 60 * 24, "day" }, { 60 * 60 * 24 * 7, "week", "wk" }, { 60 * 60 * 24 * 30, "month" }, { 60 * 60 * 24 * 365.25, "year", "yr" }, }), } Time.__index = Time function Tim...
544
kohls-admin/kohls-admin
kohls-admin-kohls-admin-2413f1e/src/Shared/Util/getTexture.luau
luau
.luau
local InsertService = game:GetService("InsertService") local MarketplaceService = game:GetService("MarketplaceService") local RunService = game:GetService("RunService") local loadAssetTextureTypes = { Enum.AssetType.Face.Value, Enum.AssetType.Shirt.Value, Enum.AssetType.Pants.Value, Enum.AssetType.TShirt.Value, } ...
355
kohls-admin/kohls-admin
kohls-admin-kohls-admin-2413f1e/src/Shared/Util/getUserInfo.luau
luau
.luau
local UserService = game:GetService("UserService") local RunService = game:GetService("RunService") local Function = require(script.Parent:WaitForChild("Function")) local Signal = require(script.Parent:WaitForChild("Signal")) local SafePlayerAdded = require(script.Parent:WaitForChild("SafePlayerAdded")) type UserInfo...
790
kohls-admin/kohls-admin
kohls-admin-kohls-admin-2413f1e/src/Shared/Util/init.luau
luau
.luau
local Logger = require(script:WaitForChild("Logger")) export type Log = Logger.Log export type LogType = Logger.LogType export type Logger = Logger.Logger --- @class Util local Util = { --- @within Util --- @prop Logger Logger Logger = Logger, Defer = require(script:WaitForChild("Defer")), Function = require(sc...
361
kohls-admin/kohls-admin
kohls-admin-kohls-admin-2413f1e/src/Shared/Util/iterPageItems.luau
luau
.luau
local function pagesToTable(pages) local items = {} while true do table.insert(items, pages:GetCurrentPage()) if pages.IsFinished then break end pages:AdvanceToNextPageAsync() end return items end local function iterPageItems(pages) local contents = pagesToTable(pages) local pageNum = 1 local lastPag...
142
kohls-admin/kohls-admin
kohls-admin-kohls-admin-2413f1e/src/Shared/VIP/Popup.luau
luau
.luau
local MarketplaceService = game:GetService("MarketplaceService") local RunService = game:GetService("RunService") local Util = require(script.Parent.Parent.Util) local LocalPlayer = game.Players.LocalPlayer if RunService:IsServer() then return false end local vip = Instance.new("Frame") vip.Name = "VIP" vip.Anchor...
5,028
kohls-admin/kohls-admin
kohls-admin-kohls-admin-2413f1e/src/Shared/VIP/Purchasables.luau
luau
.luau
return { chatCommands = { 115444443724463, -- 40% off chat commands 110019084552349, -- chat commands 130880915606069, -- elite 84349662672781, -- epic 129439770798699, -- hero 132161234381156, -- legend 89859349616824, -- mythic 102980653148583, -- eternal }, chatCommandsLower = { 88978146769822, ...
1,299
kohls-admin/kohls-admin
kohls-admin-kohls-admin-2413f1e/src/Shared/VIP/Title/init.luau
luau
.luau
local CollectionService = game:GetService("CollectionService") local RunService = game:GetService("RunService") local Package = script.Parent.Parent.Parent local Flux = require(Package:WaitForChild("Flux")) local Oklab = Flux.Color.Oklab local function sortKeypoints(a, b) return a.Time < b.Time end local Title = ...
1,845
kohls-admin/kohls-admin
kohls-admin-kohls-admin-2413f1e/src/Shared/VIP/UGC/AlphaWings/Animate/Animate.luau
luau
.luau
local TweenService = game:GetService("TweenService") local Animate = { timeScale = 1, } function Animate.getBoneFromPose(rig: Instance, pose: Pose): Motor6D? if not pose.Parent then return end local poseParentName = pose.Parent.Name for i, v in rig:GetDescendants() do if v:IsA("Bone") and v.Name == pose.Name...
631
kohls-admin/kohls-admin
kohls-admin-kohls-admin-2413f1e/src/Shared/VIP/UGC/AlphaWings/Animate/init.client.luau
luau
.luau
local part = script.Parent local Animate = require(script:WaitForChild("Animate")) local Animations = script:WaitForChild("Animations") local fall = Animations:WaitForChild("fall") local idle = Animations:WaitForChild("idle") local idle2 = Animations:WaitForChild("idle2") local humanoid = part.Parent.Parent:FindFirs...
445
kohls-admin/kohls-admin
kohls-admin-kohls-admin-2413f1e/src/Shared/VIP/UGC/AlphaWings/Bones.luau
luau
.luau
local part = Instance.new("Part") part.Anchored = true part.CanCollide = false part.CanQuery = false part.CanTouch = false part.Locked = true part.Transparency = 1 local boneL1 = Instance.new("Bone", part) boneL1.Name = "Bone_l" boneL1.CFrame = CFrame.new(-0.576, 0, 0) * CFrame.Angles(0, 0, math.rad(76.663)) local bo...
426
kohls-admin/kohls-admin
kohls-admin-kohls-admin-2413f1e/src/Shared/VIP/UGC/AlphaWings/init.luau
luau
.luau
local CollectionService = game:GetService("CollectionService") local InsertService = game:GetService("InsertService") local RunService = game:GetService("RunService") local Package = script.Parent.Parent.Parent.Parent local Flux = require(Package:WaitForChild("Flux")) local Util = require(Package.Shared:WaitForChild(...
1,043
kohls-admin/kohls-admin
kohls-admin-kohls-admin-2413f1e/src/Shared/VIP/UGC/Crown.luau
luau
.luau
local CollectionService = game:GetService("CollectionService") local InsertService = game:GetService("InsertService") local RunService = game:GetService("RunService") local Package = script.Parent.Parent.Parent.Parent local Flux = require(Package:WaitForChild("Flux")) local Util = require(Package.Shared:WaitForChild(...
1,195
kohls-admin/kohls-admin
kohls-admin-kohls-admin-2413f1e/src/Shared/VIP/init.luau
luau
.luau
local Auth = require(script.Parent:WaitForChild("Auth")) local Data = require(script.Parent:WaitForChild("Data")) local Util = require(script.Parent:WaitForChild("Util")) local Popup = require(script:WaitForChild("Popup")) local Purchasables = require(script:WaitForChild("Purchasables")) local Title = require(script:W...
3,091
kohls-admin/kohls-admin
kohls-admin-kohls-admin-2413f1e/src/init.luau
luau
.luau
-- src/init.luau --- @class MainModule if shared._K_INTERFACE then return shared._K_INTERFACE end local RunService = game:GetService("RunService") local requireStart = os.clock() local Client = script:WaitForChild("Client") local Server = RunService:IsServer() and script:WaitForChild("Server") local Shared = script:...
1,692
loneka/onyx-ui
loneka-onyx-ui-978b53c/samples/SettingsMenu/SettingToggle.luau
luau
.luau
local OnyxUI = script.Parent.Parent.Parent.OnyxUI.Packages.OnyxUI local Themer = require(OnyxUI.Themer) local Fusion = require(OnyxUI.Parent.Fusion) local Util = require(OnyxUI.Util) local Children = Fusion.Children local SwitchGroup = require(script.Parent.SwitchGroup) local Switch = require(OnyxUI.Components.Switch...
462
loneka/onyx-ui
loneka-onyx-ui-978b53c/samples/SettingsMenu/SettingsMenu.story.luau
luau
.luau
local OnyxUI = script.Parent.Parent.Parent.OnyxUI.Packages.OnyxUI local Fusion = require(OnyxUI.Parent.Fusion) local Themer = require(OnyxUI.Themer) local Util = require(OnyxUI.Util) local BitCave = require(script.Parent.Parent.Themes.BitCave) local Children = Fusion.Children local Frame = require(OnyxUI.Components.F...
253
loneka/onyx-ui
loneka-onyx-ui-978b53c/samples/SettingsMenu/SwitchGroup.luau
luau
.luau
local OnyxUI = script.Parent.Parent.Parent.OnyxUI.Packages.OnyxUI local Util = require(OnyxUI.Util) local Themer = require(OnyxUI.Themer) local Fusion = require(OnyxUI.Parent.Fusion) local BaseButton = require(OnyxUI.Components.BaseButton) local Switch = require(OnyxUI.Components.Switch) local Components = { BaseButt...
228
loneka/onyx-ui
loneka-onyx-ui-978b53c/samples/SettingsMenu/init.luau
luau
.luau
local OnyxUI = require(script.Parent.Parent.OnyxUI) local Fusion = require(script.Parent.Parent.OnyxUI.Packages.Fusion) local Themer = OnyxUI.Themer local Util = OnyxUI.Util local Children = Fusion.Children local SettingToggle = require(script.SettingToggle) export type Props = { Parent: Fusion.UsedAs<Instance>?, }...
646
loneka/onyx-ui
loneka-onyx-ui-978b53c/samples/Testing/ContextualPalette.story.luau
luau
.luau
local OnyxUI = require(script.Parent.Parent.Parent.OnyxUI) local Fusion = require(script.Parent.Parent.Parent.OnyxUI.Packages.OnyxUI.Parent.Fusion) local Util = OnyxUI.Util local Themer = OnyxUI.Themer local Components = OnyxUI.Components local Children = Fusion.Children local function Palette(Scope: Fusion.Scope<any...
518
loneka/onyx-ui
loneka-onyx-ui-978b53c/samples/Themes/BitCave.luau
luau
.luau
local OnyxUI = script.Parent.Parent.Parent.OnyxUI.Packages.OnyxUI local Util = require(OnyxUI.Util) local NewTheme = require(OnyxUI.Themer.NewTheme) local Fusion = require(OnyxUI.Parent.Fusion) local Scope = Fusion.scoped() local BitCave = NewTheme(Scope, { Colors = { Primary = { Main = Util.Colors.White, }, ...
499
loneka/onyx-ui
loneka-onyx-ui-978b53c/scripts/pesdeToWally.luau
luau
.luau
local fs = require("@lune/fs") local serde = require("@lune/serde") local function convertDependencies(pesdeDependencies) local wallyDependencies = {} for alias, dependency in pairs(pesdeDependencies) do if next(dependency) ~= nil then assert(dependency.name == nil, `Package relies on Pesde package.`) if d...
375
loneka/onyx-ui
loneka-onyx-ui-978b53c/src/Components/AutoScaler.luau
luau
.luau
--[=[ @class AutoScaler Automatically scales children for the user's screen. 📱💻📺🥽 ]=] --[=[ @interface AutoScalerProps @within AutoScaler . ... FrameProps -- All Frame properties are accepted. .BaseResolution Vector2 -- The base resolution to scale from. .MinScale number -- The minimum scale factor. ...
474
loneka/onyx-ui
loneka-onyx-ui-978b53c/src/Components/AutoScaler.story.luau
luau
.luau
local OnyxUI = script.Parent.Parent local Fusion = require(OnyxUI.Parent.Fusion) local Themer = require(OnyxUI.Themer) local Util = require(OnyxUI.Util) local Children = Fusion.Children local AutoScaler = require(OnyxUI.Components.AutoScaler) local Card = require(OnyxUI.Components.Card) local Components = { AutoScal...
253
loneka/onyx-ui
loneka-onyx-ui-978b53c/src/Components/Avatar.luau
luau
.luau
--[=[ @class Avatar Useful for displaying player headshots and profile pictures. And optionally, user status. ]=] --[=[ @interface AvatarProps @within Avatar . ... ImageProps -- All Image properties are accepted. .Image string? -- The image to display in the avatar. .RingEnabled boolean? -- Whether the r...
1,089
loneka/onyx-ui
loneka-onyx-ui-978b53c/src/Components/Avatar.story.luau
luau
.luau
local OnyxUI = script.Parent.Parent local Fusion = require(OnyxUI.Parent.Fusion) local Themer = require(OnyxUI.Themer) local Util = require(OnyxUI.Util) local Children = Fusion.Children local Frame = require(script.Parent.Frame) local Avatar = require(script.Parent.Avatar) local Components = { Frame = Frame, Avata...
843
loneka/onyx-ui
loneka-onyx-ui-978b53c/src/Components/Badge.luau
luau
.luau
--[=[ @class Badge Used to inform the user of something's status. E.g. a notification indicator or discount tag. ]=] --[=[ @interface BadgeProps @within Badge . ... FrameProps -- All Frame properties are accepted. .Content {string}? -- The content to display inside the badge. .ContentWrapped boolean? -- ...
710
loneka/onyx-ui
loneka-onyx-ui-978b53c/src/Components/Badge.story.luau
luau
.luau
local OnyxUI = script.Parent.Parent local Fusion = require(OnyxUI.Parent.Fusion) local Themer = require(OnyxUI.Themer) local Util = require(OnyxUI.Util) local Children = Fusion.Children local Frame = require(OnyxUI.Components.Frame) local Badge = require(OnyxUI.Components.Badge) local Text = require(OnyxUI.Component...
592
loneka/onyx-ui
loneka-onyx-ui-978b53c/src/Components/Base.luau
luau
.luau
--[=[ @class Base The foundational component of OnyxUI, from which all other components are built off of. Props supported here typically work in all other components. ]=] --[=[ @interface GradientProps @within Base .Enabled boolean? -- Whether the gradient is enabled. .Color ColorSequence? -- The color seque...
6,489
loneka/onyx-ui
loneka-onyx-ui-978b53c/src/Components/Base.story.luau
luau
.luau
local OnyxUI = script.Parent.Parent local Fusion = require(OnyxUI.Parent.Fusion) local Themer = require(OnyxUI.Themer) local Util = require(OnyxUI.Util) local Components = require(OnyxUI.Components) local Children = Fusion.Children return { story = function(Props) local Theme = Themer.Theme:now() local Scope = F...
1,090
loneka/onyx-ui
loneka-onyx-ui-978b53c/src/Components/BaseButton.luau
luau
.luau
--[=[ @class BaseButton A barebones button component, like if Roblox had a "`Button`" class rather than only a `TextButton`. ]=] --[=[ @interface BaseButtonProps @within BaseButton . ... BaseProps -- All Base properties are accepted. .Disabled boolean? -- Whether the button is disabled. .OnActivate (() ->...
1,108
loneka/onyx-ui
loneka-onyx-ui-978b53c/src/Components/Button.luau
luau
.luau
--[=[ @class Button A robust button component, supporting text and icons, and multiple variants. ]=] --[=[ @interface ButtonProps @within Button . ... BaseButtonProps -- All BaseButton properties are accepted. .Disabled boolean? -- Whether the button is disabled. .Style string? -- The style of the button ...
1,832