repo
stringclasses
341 values
file_path
stringlengths
29
173
language
stringclasses
2 values
file_type
stringclasses
4 values
code
stringlengths
2
1.66M
tokens
int64
2
598k
kohls-admin/kohls-admin
kohls-admin-kohls-admin-d4d40b0/src/Client/Market.luau
luau
.luau
local UI = require(script.Parent:WaitForChild("UI")) local Market = {} Market.__index = Market function Market.new(_K) local scroller = UI.new "Scroller" { Name = "Market", } task.defer(function() local donationLevel = _K.LocalPlayer:GetAttribute("_KDonationLevel") local equippedUGC = {} local debounceEq...
6,357
kohls-admin/kohls-admin
kohls-admin-kohls-admin-d4d40b0/src/Client/Members.luau
luau
.luau
local UI = require(script.Parent:WaitForChild("UI")) local Members = {} Members.__index = Members function Members.new(_K) local escape = _K.Util.String.escapeRichText local inputSize = function() local size = UI.Theme.FontSize() local padding = UI.Theme.Padding().Offset return UDim2.fromOffset(0, size + pad...
4,980
kohls-admin/kohls-admin
kohls-admin-kohls-admin-d4d40b0/src/Client/Network.luau
luau
.luau
local _K = require(script.Parent.Parent) local UI = _K.UI _K.client.updateInterfaceAuth = _K.Util.Function.debounce(0.2, function() local userId = _K.LocalPlayer.UserId local userRank = _K.Auth.getRank(userId) _K.client.rank(userRank) local commandBarRank = _K.client.settings.commandBarRank._value local dashboar...
1,791
kohls-admin/kohls-admin
kohls-admin-kohls-admin-d4d40b0/src/Client/Notify.luau
luau
.luau
local _K = require(script.Parent.Parent) local UI = _K.UI local announcements = {} local notifications = {} local function resetOffset(announce: boolean?) local heightOffset = 0 for i, list in ipairs(if announce then announcements else notifications) do local card, _, offset = unpack(list) offset(heightOffset, t...
1,113
kohls-admin/kohls-admin
kohls-admin-kohls-admin-d4d40b0/src/Client/Servers.luau
luau
.luau
local UI = require(script.Parent:WaitForChild("UI")) local Servers = {} Servers.__index = Servers function Servers.new(_K) local servers = _K.Data.servers local placeNames = {} local function getPlaceName(placeId: number) if placeNames[placeId] then return placeNames[placeId] end local success, info = p...
1,401
kohls-admin/kohls-admin
kohls-admin-kohls-admin-d4d40b0/src/Client/Settings.luau
luau
.luau
local UI = require(script.Parent:WaitForChild("UI")) local Settings = { _K = nil } Settings.__index = Settings local filterRichFormat = `<font transparency="0.5">%s</font><b>%s</b><font transparency="0.5">%s</font>` function Settings.new(_K) local settingsDialog local originalValues = {} local pendingChanges = {}...
7,747
kohls-admin/kohls-admin
kohls-admin-kohls-admin-d4d40b0/src/Client/UI/Classes/BaseClass.luau
luau
.luau
local BaseClass = {} BaseClass.__index = BaseClass function BaseClass:Destroy() for key, value in self do if typeof(value) == "Instance" then value:Destroy() end end end return BaseClass
54
kohls-admin/kohls-admin
kohls-admin-kohls-admin-d4d40b0/src/Client/UI/Classes/Button.luau
luau
.luau
local UI = require(script.Parent.Parent) :: any local BaseClass = require(script.Parent:WaitForChild("BaseClass")) local Tween = game:GetService("TweenService") local DEFAULT = { --- A test property. Icon = "", IconProperties = {}, IconRightAlign = false, Label = "", LabelProperties = {}, ActiveSound = true, ...
1,778
kohls-admin/kohls-admin
kohls-admin-kohls-admin-d4d40b0/src/Client/UI/Classes/Checkbox.luau
luau
.luau
local UI = require(script.Parent.Parent) :: any local BaseClass = require(script.Parent:WaitForChild("BaseClass")) local DEFAULT = { --- Whether or not the checkbox is selected. Value = false, } type Properties = typeof(DEFAULT) & TextButton local Class = {} Class.__index = Class setmetatable(Class, BaseClass) lo...
615
kohls-admin/kohls-admin
kohls-admin-kohls-admin-d4d40b0/src/Client/UI/Classes/CircleProgress.luau
luau
.luau
local UI = require(script.Parent.Parent) :: any local BaseClass = require(script.Parent:WaitForChild("BaseClass")) local DEFAULT = { Alpha = 0, Image = UI.Theme.Image.Circle, } type Properties = typeof(DEFAULT) & Frame local halfMask = NumberSequence.new({ NumberSequenceKeypoint.new(0, 0), NumberSequenceKeypoint...
649
kohls-admin/kohls-admin
kohls-admin-kohls-admin-d4d40b0/src/Client/UI/Classes/Color.luau
luau
.luau
local UI = require(script.Parent.Parent) :: any local BaseClass = require(script.Parent:WaitForChild("BaseClass")) local ColorPicker = require(script.Parent:WaitForChild("ColorPicker")) type ColorPicker = typeof(ColorPicker.new()) -- a simple color square, when clicked shows a color picker dialog local DEFAULT = { T...
443
kohls-admin/kohls-admin
kohls-admin-kohls-admin-d4d40b0/src/Client/UI/Classes/ColorPicker.luau
luau
.luau
local UI = require(script.Parent.Parent) :: any local BaseClass = require(script.Parent:WaitForChild("BaseClass")) local Menu = require(script.Parent:WaitForChild("Menu")) type Menu = typeof(Menu.new()) type MenuInstance = typeof(Menu.new()._instance) local DEFAULT = { Adornee = false, RightAlign = false, Value = C...
2,418
kohls-admin/kohls-admin
kohls-admin-kohls-admin-d4d40b0/src/Client/UI/Classes/Dialog.luau
luau
.luau
local UI = require(script.Parent.Parent) :: any local BaseClass = require(script.Parent:WaitForChild("BaseClass")) local DEFAULT = { AnchorPoint = Vector2.new(0.5, 0.5), Position = UDim2.new(0.5, 0, 0.5, 0), Text = "", TextSize = UI.Theme.FontSize, TextColor3 = UI.Theme.PrimaryText, TextStrokeColor3 = UI.Theme.P...
3,162
kohls-admin/kohls-admin
kohls-admin-kohls-admin-d4d40b0/src/Client/UI/Classes/Gradient.luau
luau
.luau
local UI = require(script.Parent.Parent) :: any local BaseClass = require(script.Parent:WaitForChild("BaseClass")) local DEFAULT = { Enabled = UI.Theme.BackgroundGradientEnabled, Start = UI.Theme.BackgroundGradient, Stop = UI.Theme.BackgroundGradientStop, Rotation = UI.Theme.BackgroundGradientAngle, } type Proper...
187
kohls-admin/kohls-admin
kohls-admin-kohls-admin-d4d40b0/src/Client/UI/Classes/Input/Clack.luau
luau
.luau
local ContentProvider = game:GetService("ContentProvider") local TextChatService = game:GetService("TextChatService") local UserInputService = game:GetService("UserInputService") local SoundService = game:GetService("SoundService") local ChatInputBarConfiguration = TextChatService:FindFirstChildOfClass("ChatInputBarCo...
522
kohls-admin/kohls-admin
kohls-admin-kohls-admin-d4d40b0/src/Client/UI/Classes/Input/init.luau
luau
.luau
local UI = require(script.Parent.Parent) :: any local BaseClass = require(script.Parent:WaitForChild("BaseClass")) local Clack = require(script.Clack).registerAll() Clack.enabled = UI.raw(UI.Theme.TypingSounds) Clack.everyTextBox = UI.raw(UI.Theme.TypingSoundsOnEveryTextBox) UI.Theme.TypingSounds:Connect(function(valu...
3,500
kohls-admin/kohls-admin
kohls-admin-kohls-admin-d4d40b0/src/Client/UI/Classes/Link.luau
luau
.luau
local UI = require(script.Parent.Parent) :: any local BaseClass = require(script.Parent:WaitForChild("BaseClass")) local DEFAULT = { Tooltip = UI.Nil, } type Properties = typeof(DEFAULT) & TextBox local Class = {} Class.__index = Class setmetatable(Class, BaseClass) function Class:_updateSelection() local instanc...
807
kohls-admin/kohls-admin
kohls-admin-kohls-admin-d4d40b0/src/Client/UI/Classes/List.luau
luau
.luau
local UI = require(script.Parent.Parent) :: any local BaseClass = require(script.Parent:WaitForChild("BaseClass")) local DEFAULT = { Collapsible = false, Collapsed = false, Label = "", Padding = UI.Theme.Padding, } type Properties = typeof(DEFAULT) & Frame local Class = {} Class.__index = Class setmetatable(Clas...
1,330
kohls-admin/kohls-admin
kohls-admin-kohls-admin-d4d40b0/src/Client/UI/Classes/ListItem.luau
luau
.luau
local UI = require(script.Parent.Parent) :: any local BaseClass = require(script.Parent:WaitForChild("BaseClass")) local DEFAULT = { Text = "ListItem", ContentAutomaticSize = true, ContentListLayout = true, Tooltip = UI.Nil, } type Properties = typeof(DEFAULT) & Frame local Class = {} Class.__index = Class setme...
751
kohls-admin/kohls-admin
kohls-admin-kohls-admin-d4d40b0/src/Client/UI/Classes/Menu.luau
luau
.luau
local UI = require(script.Parent.Parent) :: any local BaseClass = require(script.Parent:WaitForChild("BaseClass")) local DEFAULT = { Adornee = false, RightAlign = false, Visible = false, } type Properties = typeof(DEFAULT) & TextButton local Class = {} Class.__index = Class setmetatable(Class, BaseClass) local L...
1,125
kohls-admin/kohls-admin
kohls-admin-kohls-admin-d4d40b0/src/Client/UI/Classes/Scroller.luau
luau
.luau
local UI = require(script.Parent.Parent) :: any local BaseClass = require(script.Parent:WaitForChild("BaseClass")) local DEFAULT = {} type Properties = typeof(DEFAULT) & ScrollingFrame local Class = {} Class.__index = Class setmetatable(Class, BaseClass) function Class.new(properties: Properties?) local self = tab...
505
kohls-admin/kohls-admin
kohls-admin-kohls-admin-d4d40b0/src/Client/UI/Classes/ScrollerFast.luau
luau
.luau
local RunService = game:GetService("RunService") local BaseClass = require(script.Parent:WaitForChild("BaseClass")) local UI = require(script.Parent.Parent) :: any local Defer = {} do local defaultBudget, expireTime = 1 / 240, 0 -- Call at start of process to prevent unnecessarily waiting. function Defer.reset(bud...
3,034
kohls-admin/kohls-admin
kohls-admin-kohls-admin-d4d40b0/src/Client/UI/Classes/Select.luau
luau
.luau
local UI = require(script.Parent.Parent) :: any local BaseClass = require(script.Parent:WaitForChild("BaseClass")) local Button = require(script.Parent:WaitForChild("Button")) local Menu = require(script.Parent:WaitForChild("Menu")) type Button = typeof(Button.new()) type Menu = typeof(Menu.new()) local DEFAULT = { ...
1,579
kohls-admin/kohls-admin
kohls-admin-kohls-admin-d4d40b0/src/Client/UI/Classes/Slider.luau
luau
.luau
local UI = require(script.Parent.Parent) :: any local BaseClass = require(script.Parent:WaitForChild("BaseClass")) local DEFAULT = { Snap = 0, SnapSound = true, Value = 1, Vertical = false, } type Properties = typeof(DEFAULT) & Frame local Class = {} Class.__index = Class setmetatable(Class, BaseClass) function...
1,251
kohls-admin/kohls-admin
kohls-admin-kohls-admin-d4d40b0/src/Client/UI/Classes/Spacer.luau
luau
.luau
local UI = require(script.Parent.Parent) :: any local BaseClass = require(script.Parent:WaitForChild("BaseClass")) local DEFAULT = {} type Properties = typeof(DEFAULT) & Frame local Class = {} Class.__index = Class setmetatable(Class, BaseClass) function Class.new(properties: Properties?) local self = table.clone(...
161
kohls-admin/kohls-admin
kohls-admin-kohls-admin-d4d40b0/src/Client/UI/Classes/Stroke.luau
luau
.luau
local UI = require(script.Parent.Parent) :: any local BaseClass = require(script.Parent:WaitForChild("BaseClass")) local DEFAULT = {} type Properties = typeof(DEFAULT) & UIStroke local Class = {} Class.__index = Class setmetatable(Class, BaseClass) function Class.new(properties: Properties?) local self = table.clo...
208
kohls-admin/kohls-admin
kohls-admin-kohls-admin-d4d40b0/src/Client/UI/Classes/Switch.luau
luau
.luau
local UI = require(script.Parent.Parent) :: any local BaseClass = require(script.Parent:WaitForChild("BaseClass")) local DEFAULT = { Value = false, } type Properties = typeof(DEFAULT) & TextButton local itemHeight = UI.compute(function() return UI.Theme.FontSize() + UI.Theme.Padding().Offset end) local Class = {}...
635
kohls-admin/kohls-admin
kohls-admin-kohls-admin-d4d40b0/src/Client/UI/Classes/Tabs.luau
luau
.luau
local UI = require(script.Parent.Parent) :: any local BaseClass = require(script.Parent:WaitForChild("BaseClass")) local DEFAULT = { CurrentPage = false, Tabs = {}, Vertical = false, } type Properties = typeof(DEFAULT) & Frame local Class = {} Class.__index = Class setmetatable(Class, BaseClass) function Class.n...
2,826
kohls-admin/kohls-admin
kohls-admin-kohls-admin-d4d40b0/src/Client/UI/Classes/Tooltip.luau
luau
.luau
local UI = require(script.Parent.Parent) :: any local BaseClass = require(script.Parent:WaitForChild("BaseClass")) local layerSizeState = UI.state(UI.LayerTop, "AbsoluteSize") local positionState = UI.state(Vector2.zero) local sizeState = UI.state(Vector2.zero) local tipSizeState = UI.state(Vector2.zero) local toolti...
1,509
kohls-admin/kohls-admin
kohls-admin-kohls-admin-d4d40b0/src/Client/UI/Classes/Window.luau
luau
.luau
local UI = require(script.Parent.Parent) :: any local BaseClass = require(script.Parent:WaitForChild("BaseClass")) local Class = {} Class.__index = Class setmetatable(Class, BaseClass) local resizeReference = { { -1, 1, 0, 0, 48 }, -- left { 1, 0, 0, 0, 48 }, -- right { 0, 0, -1, 1, 0 }, -- top { 0, 0, 1, 0, 0 },...
4,231
kohls-admin/kohls-admin
kohls-admin-kohls-admin-d4d40b0/src/Client/UI/DefaultProperties.luau
luau
.luau
return function(UI) return { ImageButton = { HoverHapticEffect = UI.Haptic.Hover, PressHapticEffect = UI.Haptic.Click, }, TextButton = { HoverHapticEffect = UI.Haptic.Hover, PressHapticEffect = UI.Haptic.Click, }, } end
76
kohls-admin/kohls-admin
kohls-admin-kohls-admin-d4d40b0/src/Client/UI/Fonts.luau
luau
.luau
return { ["12187368317"] = "Akronim", ["12187363616"] = "Are You Serious", ["12187360881"] = "Audiowide", ["12187372847"] = "Barlow", ["12187371991"] = "Barrio", ["12187365104"] = "Blaka", ["16658237174"] = "Builder Extended", ["16658246179"] = "Builder Mono", ["16658221428"] = "Builder Sans", ["12187370000"]...
1,096
kohls-admin/kohls-admin
kohls-admin-kohls-admin-d4d40b0/src/Client/UI/Theme/Default.luau
luau
.luau
return { Transparency = 0.08, TextStrokeTransparency = 0.875, BackgroundImage = "rbxassetid://104331312960285", BackgroundImageScaleType = Enum.ScaleType.Crop, BackgroundImageTransparency = 1, BackgroundGradientEnabled = false, BackgroundGradient = Color3.fromRGB(63, 0, 31), BackgroundGradientStop = Color3.fr...
946
kohls-admin/kohls-admin
kohls-admin-kohls-admin-d4d40b0/src/Client/UI/Theme/Themes/Legacy.luau
luau
.luau
return { Transparency = 0.7, TextStrokeTransparency = 0.9, Primary = Color3.fromRGB(0, 0, 0), PrimaryText = Color3.fromRGB(255, 255, 255), Secondary = Color3.fromRGB(255, 255, 255), SecondaryText = Color3.fromRGB(0, 0, 0), Border = Color3.fromRGB(100, 100, 100), Valid = Color3.fromRGB(0, 255, 0), Invalid =...
175
kohls-admin/kohls-admin
kohls-admin-kohls-admin-d4d40b0/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-d4d40b0/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-d4d40b0/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-d4d40b0/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-d4d40b0/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,704
kohls-admin/kohls-admin
kohls-admin-kohls-admin-d4d40b0/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-d4d40b0/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-d4d40b0/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-d4d40b0/src/Server/Servers.luau
luau
.luau
local MessagingService = game:GetService("MessagingService") local Players = game:GetService("Players") local RunService = game:GetService("RunService") local Package = script.Parent local Shared = Package.Shared.Value local Remote = require(Shared.Util.Remote) :: any local SafeTeleport = require(Shared.Util.SafeTele...
757
kohls-admin/kohls-admin
kohls-admin-kohls-admin-d4d40b0/src/Shared/Auth.luau
luau
.luau
local Players = game:GetService("Players") 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 ...
4,549
kohls-admin/kohls-admin
kohls-admin-kohls-admin-d4d40b0/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-d4d40b0/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-d4d40b0/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-d4d40b0/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-d4d40b0/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-d4d40b0/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-d4d40b0/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-d4d40b0/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-d4d40b0/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-d4d40b0/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-d4d40b0/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,004
kohls-admin/kohls-admin
kohls-admin-kohls-admin-d4d40b0/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-d4d40b0/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-d4d40b0/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-d4d40b0/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-d4d40b0/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-d4d40b0/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-d4d40b0/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-d4d40b0/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-d4d40b0/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-d4d40b0/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-d4d40b0/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-d4d40b0/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-d4d40b0/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-d4d40b0/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-d4d40b0/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-d4d40b0/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-d4d40b0/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-d4d40b0/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-d4d40b0/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-d4d40b0/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-d4d40b0/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-d4d40b0/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-d4d40b0/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-d4d40b0/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-d4d40b0/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-d4d40b0/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-d4d40b0/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-d4d40b0/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-d4d40b0/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-d4d40b0/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-d4d40b0/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-d4d40b0/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-d4d40b0/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-d4d40b0/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-d4d40b0/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-d4d40b0/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-d4d40b0/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-d4d40b0/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-d4d40b0/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-d4d40b0/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-d4d40b0/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-d4d40b0/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-d4d40b0/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-d4d40b0/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-d4d40b0/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