repo stringclasses 254
values | file_path stringlengths 29 241 | code stringlengths 100 233k | tokens int64 14 69.4k |
|---|---|---|---|
MaximumADHD/Roblox-Boilerplate | MaximumADHD-Roblox-Boilerplate-4358d1a/Shared/Trove.luau | -- Trove
-- MaximumADHD
-- November 30th, 2022
--!native
--!strict
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Packages = ReplicatedStorage.Packages
local Shared = ReplicatedStorage.Shared
local Trove = require(Packages.Trove)
local Signal = require(Shared.Signal)
local Promise = require(Sh... | 404 |
Roblox/jest-roblox | Roblox-jest-roblox-59c4d60/scripts/analyze.luau | local run = require("./utils/run")
print("Running static analysis...")
local seleneCmd = { "selene", "src" }
local styluaCmd = { "stylua", "-c", "src" }
local analyzeCmd = { "robloxdev-cli", "analyze", "default.project.json", "--fastFlags.allOnLuau" }
run(seleneCmd)
run(styluaCmd)
run(analyzeCmd)
| 90 |
Roblox/jest-roblox | Roblox-jest-roblox-59c4d60/scripts/utils/patchErrorPolyfill.luau | local fs = require("@std/fs")
local OPTIMIZE_DIRECTIVE = "--!optimize 1"
return function(path)
local file = fs.open(path, "r+")
if file == nil then
error(`Failed to open file: {path}`)
end
local contents = string.split(fs.readfiletostring(path), "\n")
if contents[1] ~= OPTIMIZE_DIRECTIVE then
table.insert(... | 114 |
Roblox/jest-roblox | Roblox-jest-roblox-59c4d60/scripts/utils/run.luau | local process = require("@lute/process")
return function(cmd)
print(`> {table.concat(cmd, " ")}`)
local ok, result = pcall(function()
return process.run(cmd, { stdio = "inherit", env = { PATH = `{process.cwd()}:{process.env.PATH}` } })
end)
if not ok then
error(result)
end
if result.ok then
print(result... | 110 |
Roblox/jest-roblox | Roblox-jest-roblox-59c4d60/src/jest-benchmark/src/CustomReporters.lua | --!strict
--[[
* Copyright (c) Roblox Corporation. All rights reserved.
* Licensed under the MIT License (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://opensource.org/licenses/MIT
*
* Unless required by applicable law... | 301 |
Roblox/jest-roblox | Roblox-jest-roblox-59c4d60/src/jest-benchmark/src/MetricLogger.lua | --!strict
--[[
* Copyright (c) Roblox Corporation. All rights reserved.
* Licensed under the MIT License (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://opensource.org/licenses/MIT
*
* Unless required by applicable law... | 297 |
Roblox/jest-roblox | Roblox-jest-roblox-59c4d60/src/jest-benchmark/src/__tests__/utils.lua | local exports = {}
local function sum(nums: { number })
local sum = 0
for _, num in nums do
sum += num
end
return sum
end
exports.sum = sum
local function average(nums: { number })
if #nums > 0 then
return sum(nums) / #nums
end
return 0
end
exports.average = average
return exports
| 83 |
Roblox/jest-roblox | Roblox-jest-roblox-59c4d60/src/jest-benchmark/src/benchmark.lua | --!strict
--[[
* Copyright (c) Roblox Corporation. All rights reserved.
* Licensed under the MIT License (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://opensource.org/licenses/MIT
*
* Unless required by applicable law... | 764 |
Roblox/jest-roblox | Roblox-jest-roblox-59c4d60/src/jest-benchmark/src/heartbeatModule.lua | --!strict
--[[
* Copyright (c) Roblox Corporation. All rights reserved.
* Licensed under the MIT License (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://opensource.org/licenses/MIT
*
* Unless required by applicable law... | 179 |
Roblox/jest-roblox | Roblox-jest-roblox-59c4d60/src/jest-benchmark/src/init.lua | --!strict
--[[
* Copyright (c) Roblox Corporation. All rights reserved.
* Licensed under the MIT License (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://opensource.org/licenses/MIT
*
* Unless required by applicable law... | 225 |
Roblox/jest-roblox | Roblox-jest-roblox-59c4d60/src/jest-benchmark/src/reporters/FpsReporter.lua | --!strict
--[[
* Copyright (c) Roblox Corporation. All rights reserved.
* Licensed under the MIT License (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://opensource.org/licenses/MIT
*
* Unless required by applicable law... | 279 |
Roblox/jest-roblox | Roblox-jest-roblox-59c4d60/src/jest-benchmark/src/reporters/HeartbeatReporter.lua | --!strict
--[[
* Copyright (c) Roblox Corporation. All rights reserved.
* Licensed under the MIT License (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://opensource.org/licenses/MIT
*
* Unless required by applicable law... | 453 |
Roblox/jest-roblox | Roblox-jest-roblox-59c4d60/src/jest-benchmark/src/reporters/SectionTimeReporter.lua | --!strict
--[[
* Copyright (c) Roblox Corporation. All rights reserved.
* Licensed under the MIT License (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://opensource.org/licenses/MIT
*
* Unless required by applicable law... | 360 |
Roblox/jest-roblox | Roblox-jest-roblox-59c4d60/src/jest-circus/src/init.lua | -- ROBLOX upstream: no upstream
--[[
* Copyright (c) Roblox Corporation. All rights reserved.
* Licensed under the MIT License (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://opensource.org/licenses/MIT
*
* Unless requ... | 226 |
Roblox/jest-roblox | Roblox-jest-roblox-59c4d60/src/jest-console/src/helpers.lua | --[[
* Copyright (c) Roblox Corporation. All rights reserved.
* Licensed under the MIT License (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://opensource.org/licenses/MIT
*
* Unless required by applicable law or agreed... | 555 |
Roblox/jest-roblox | Roblox-jest-roblox-59c4d60/src/jest-diff/src/PrettyFormat.lua | --[[
* Copyright (c) Roblox Corporation. All rights reserved.
* Licensed under the MIT License (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://opensource.org/licenses/MIT
*
* Unless required by applicable law or agreed... | 335 |
Roblox/jest-roblox | Roblox-jest-roblox-59c4d60/src/jest-each/src/nilPlaceholder.lua | --[[
* Copyright (c) Roblox Corporation. All rights reserved.
* Licensed under the MIT License (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://opensource.org/licenses/MIT
*
* Unless required by applicable law or agreed... | 188 |
Roblox/jest-roblox | Roblox-jest-roblox-59c4d60/src/jest-globals/src/init.lua | -- /**
-- * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
-- *
-- * This source code is licensed under the MIT license found in the
-- * LICENSE file in the root directory of this source tree.
-- *
-- */
-- ROBLOX deviation START: add export for additional Expect types
local Packages = sc... | 133 |
Roblox/jest-roblox | Roblox-jest-roblox-59c4d60/src/jest-mock-genv/src/init.lua | --!nonstrict
-- ROBLOX NOTE: no upstream
--[[
* Copyright (c) Roblox Corporation. All rights reserved.
* Licensed under the MIT License (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://opensource.org/licenses/MIT
*
* Un... | 1,380 |
Roblox/jest-roblox | Roblox-jest-roblox-59c4d60/src/jest-mock-rbx/src/DataModelMocker.lua | --[[
* Copyright (c) Roblox Corporation. All rights reserved.
* Licensed under the MIT License (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://opensource.org/licenses/MIT
*
* Unless required by applicable law or agreed... | 604 |
Roblox/jest-roblox | Roblox-jest-roblox-59c4d60/src/jest-mock-rbx/src/init.lua | --[[
* Copyright (c) Roblox Corporation. All rights reserved.
* Licensed under the MIT License (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://opensource.org/licenses/MIT
*
* Unless required by applicable law or agreed... | 265 |
Roblox/jest-roblox | Roblox-jest-roblox-59c4d60/src/jest-runtime/src/__tests__/rbs_native_errors.global.lua | -- Captures the actual error messages from the native require for @rbx and @std
-- passthrough paths. These vary across roblox-cli versions, so we capture them
-- dynamically rather than hardcoding expected strings.
--
-- This module must be loaded with the real Roblox native require, NOT Jest's
-- sandboxed require.
... | 201 |
Roblox/jest-roblox | Roblox-jest-roblox-59c4d60/src/jest-runtime/src/_types.lua | --[[*
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
]]
-- ROBLOX NOTE: Not paired with upstream. Just using for the "Jest Object" type
local CurrentModule = scrip... | 395 |
Roblox/jest-roblox | Roblox-jest-roblox-59c4d60/src/jest-runtime/src/resolveInstancePath.lua | local PATH_SEPARATOR = "/"
local PASSTHROUGH_PREFIXES = { "@std", "@rbx" }
local function resolveInstancePath(relativeTo: Instance, instancePath: string): Instance?
local parts = instancePath:split(PATH_SEPARATOR)
local firstPart = parts[1]
for _, prefix in PASSTHROUGH_PREFIXES do
if firstPart == prefix then
... | 582 |
Roblox/jest-roblox | Roblox-jest-roblox-59c4d60/src/jest-util/src/getFileSystemService.lua | --[[
* Copyright (c) Roblox Corporation. All rights reserved.
* Licensed under the MIT License (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://opensource.org/licenses/MIT
*
* Unless required by applicable law or agreed... | 278 |
Roblox/jest-roblox | Roblox-jest-roblox-59c4d60/src/jest/src/args.roblox.lua | local processServiceExists, ProcessService = pcall(function()
return game:GetService("ProcessService")
end)
local args = {}
if processServiceExists then
for _, arg in ProcessService:GetCommandLineArgs() do
local a = arg:split("=")
a[1] = a[1]:gsub("^%-%-", "")
args[a[1]] = a[2] or true
end
end
return args
| 90 |
Roblox/jest-roblox | Roblox-jest-roblox-59c4d60/src/path/src/init.lua | local CurrentModule = script
local pathModule = require(CurrentModule.path)
local Path = pathModule.Path
export type Path = pathModule.Path
function makePathImpl()
local path = Path.new()
path:initialize("/", "/")
return path
end
return {
path = makePathImpl(),
Path = Path,
}
| 65 |
Roblox/jest-roblox | Roblox-jest-roblox-59c4d60/src/pretty-format/src/__tests__/dont_touch_im_used_in_snapshots/please_dont_touch_this.lua | --[[
I copied this folder into here for testing purposes.
Specifically, one of the unit tests tries to serialise this folder, and
saves the result to a snapshot. If the snapshot changes, the test fails.
So if you touch this folder, you'll break that test.
Apart from that, nothing in here does any... | 77 |
Roblox/jest-roblox | Roblox-jest-roblox-59c4d60/src/pretty-format/src/plugins/RedactStackTraces.lua | --[[
* Copyright (c) Roblox Corporation. All rights reserved.
* Licensed under the MIT License (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://opensource.org/licenses/MIT
*
* Unless required by applicable law or agreed... | 560 |
Roblox/jest-roblox | Roblox-jest-roblox-59c4d60/src/pretty-format/src/plugins/RobloxInstance.lua | --[[
* Copyright (c) Roblox Corporation. All rights reserved.
* Licensed under the MIT License (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://opensource.org/licenses/MIT
*
* Unless required by applicable law or agreed... | 1,198 |
Roblox/jest-roblox | Roblox-jest-roblox-59c4d60/src/roblox-shared/src/RobloxInstance.lua | --!nonstrict
--[[
* Copyright (c) Roblox Corporation. All rights reserved.
* Licensed under the MIT License (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://opensource.org/licenses/MIT
*
* Unless required by applicable ... | 1,960 |
Roblox/jest-roblox | Roblox-jest-roblox-59c4d60/src/roblox-shared/src/Writeable.lua | --[[
* Copyright (c) Roblox Corporation. All rights reserved.
* Licensed under the MIT License (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://opensource.org/licenses/MIT
*
* Unless required by applicable law or agreed... | 292 |
Roblox/jest-roblox | Roblox-jest-roblox-59c4d60/src/roblox-shared/src/__tests__/getParent.test.lua | --[[
* Copyright (c) Roblox Corporation. All rights reserved.
* Licensed under the MIT License (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://opensource.org/licenses/MIT
*
* Unless required by applicable law or agreed... | 526 |
Roblox/jest-roblox | Roblox-jest-roblox-59c4d60/src/roblox-shared/src/cleanLoadStringStack.lua | return function(line: string): string
local spacing, filePath, lineNumber, extra = line:match('(%s*)%[string "(.-)"%]:(%d+)(.*)')
if filePath then
local match = filePath
if spacing then
match = spacing .. match
end
if lineNumber then
match = match .. ":" .. lineNumber
end
if extra then
match = ma... | 107 |
Roblox/jest-roblox | Roblox-jest-roblox-59c4d60/src/roblox-shared/src/ensureDirectoryExists.lua | -- moved from jest-snapshot/utils.lua
local Packages = script.Parent.Parent
local LuauPolyfill = require(Packages.LuauPolyfill)
local Error = LuauPolyfill.Error
local getParent = require(script.Parent.getParent)
local getDataModelService = require(script.Parent.getDataModelService)
local FileSystemService = getDataM... | 241 |
Roblox/jest-roblox | Roblox-jest-roblox-59c4d60/src/roblox-shared/src/escapePatternCharacters.lua | local function escapePatternCharacters(str: string): string
return string.gsub(str, "([%(%)%.%%%+%-%*%?%[%^%$])", "%%%1")
end
return {
escapePatternCharacters = escapePatternCharacters,
}
| 52 |
Roblox/jest-roblox | Roblox-jest-roblox-59c4d60/src/roblox-shared/src/getDataModelService.lua | -- checks that the service exists and is accessible before returning it, otherwise returns nil
return function(service: string)
local success, result = pcall(function()
local service = game:GetService(service)
local _ = service.Name
return service
end)
return success and result or nil
end
| 63 |
Roblox/jest-roblox | Roblox-jest-roblox-59c4d60/src/roblox-shared/src/getParent.lua | -- ROBLOX deviation: added to handle file paths in snapshot/State
local function getParent(path: string, level_: number?): string
local level = if level_ then level_ else 0
local isUnixPath = string.sub(path, 1, 1) == "/"
local t = {}
for p in string.gmatch(path, "[^\\/][^\\/]*") do
table.insert(t, p)
end
if ... | 147 |
Roblox/jest-roblox | Roblox-jest-roblox-59c4d60/src/roblox-shared/src/getRelativePath.lua | --[[
* Copyright (c) Roblox Corporation. All rights reserved.
* Licensed under the MIT License (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://opensource.org/licenses/MIT
*
* Unless required by applicable law or agreed... | 224 |
Roblox/jest-roblox | Roblox-jest-roblox-59c4d60/src/roblox-shared/src/init.lua | --[[
* Copyright (c) Roblox Corporation. All rights reserved.
* Licensed under the MIT License (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://opensource.org/licenses/MIT
*
* Unless required by applicable law or agreed... | 371 |
Roblox/jest-roblox | Roblox-jest-roblox-59c4d60/src/roblox-shared/src/nodeUtils.lua | --[[
* Copyright (c) Roblox Corporation. All rights reserved.
* Licensed under the MIT License (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://opensource.org/licenses/MIT
*
* Unless required by applicable law or agreed... | 384 |
Roblox/jest-roblox | Roblox-jest-roblox-59c4d60/src/roblox-shared/src/normalizePromiseError.lua | --[[
* Copyright (c) Roblox Corporation. All rights reserved.
* Licensed under the MIT License (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://opensource.org/licenses/MIT
*
* Unless required by applicable law or agreed... | 344 |
Roblox/jest-roblox | Roblox-jest-roblox-59c4d60/src/roblox-shared/src/pruneDeps.lua | --[[
* Copyright (c) Roblox Corporation. All rights reserved.
* Licensed under the MIT License (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://opensource.org/licenses/MIT
*
* Unless required by applicable law or agreed... | 276 |
Roblox/jest-roblox | Roblox-jest-roblox-59c4d60/src/roblox-shared/src/redactStackTrace.lua | --[[
* Copyright (c) Roblox Corporation. All rights reserved.
* Licensed under the MIT License (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://opensource.org/licenses/MIT
*
* Unless required by applicable law or agreed... | 420 |
Roblox/jest-roblox | Roblox-jest-roblox-59c4d60/src/roblox-shared/src/stripAnsi.lua | --[[
* Copyright (c) Roblox Corporation. All rights reserved.
* Licensed under the MIT License (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://opensource.org/licenses/MIT
*
* Unless required by applicable law or agreed... | 200 |
littensy/remo | littensy-remo-da8fe74/examples/lua/src/client/todos.client.lua | local ReplicatedStorage = game:GetService("ReplicatedStorage")
local remotes = require(ReplicatedStorage.Shared.remotes)
local names = require(ReplicatedStorage.Shared.names)
local todos: { string } = {}
local function addTodo()
remotes.addTodo:fire(names.getRandomName())
end
local function removeTodo()
if #todos... | 214 |
littensy/remo | littensy-remo-da8fe74/examples/lua/src/server/todos.server.lua | local ReplicatedStorage = game:GetService("ReplicatedStorage")
local RunService = game:GetService("RunService")
local remotes = require(ReplicatedStorage.Shared.remotes)
local todos: { string } = { "Milk", "Eggs" }
local changed = false
remotes.addTodo:connect(function(player, todo)
table.insert(todos, todo)
chang... | 181 |
littensy/remo | littensy-remo-da8fe74/examples/lua/src/shared/names.lua | local names = {
"Milk",
"Eggs",
"Bread",
"Butter",
"Cheese",
"Bacon",
"Sausage",
"Ham",
"Chicken",
"Beef",
"Pork",
"Fish",
"Rice",
"Pasta",
"Potatoes",
"Onions",
"Garlic",
"Tomatoes",
"Carrots",
"Peppers",
"Lettuce",
"Cucumber",
"Mushrooms",
"Spinach",
"Broccoli",
"Cauliflower",
"Celery",
"A... | 540 |
littensy/remo | littensy-remo-da8fe74/examples/lua/src/shared/remotes.lua | local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Remo = require(ReplicatedStorage.Packages.Remo)
local t = require(ReplicatedStorage.Packages.t)
type Remotes = Remo.Remotes<{
addTodo: Remo.ClientToServer<string>,
removeTodo: Remo.ClientToServer<string>,
getTodos: Remo.ServerAsync<(), ({ string ... | 171 |
littensy/remo | littensy-remo-da8fe74/scripts/spec.server.luau | local ReplicatedStorage = game:GetService("ReplicatedStorage")
local TestEZ: any = require(ReplicatedStorage.DevPackages.TestEZ)
TestEZ.TestBootstrap:run({
ReplicatedStorage.Packages.Remo,
})
| 46 |
littensy/remo | littensy-remo-da8fe74/src/Promise.luau | local ReplicatedStorage = game:GetService("ReplicatedStorage")
local include = script:FindFirstAncestor("rbxts_include")
or script:FindFirstAncestor("include")
or ReplicatedStorage:FindFirstChild("rbxts_include")
or script.Parent.Parent
export type PromiseStatus = "Started" | "Resolved" | "Rejected" | "Cancelled"
... | 1,174 |
littensy/remo | littensy-remo-da8fe74/src/client/createRemote.luau | local Promise = require(script.Parent.Parent.Promise)
local types = require(script.Parent.Parent.types)
local compose = require(script.Parent.Parent.utils.compose)
local instances = require(script.Parent.Parent.utils.instances)
local testRemote = require(script.Parent.Parent.utils.testRemote)
local function createRem... | 729 |
littensy/remo | littensy-remo-da8fe74/src/constants.luau | local RunService = game:GetService("RunService")
return {
IS_EDIT = RunService:IsStudio() and not RunService:IsRunning(),
IS_STUDIO = RunService:IsStudio(),
IS_CLIENT = RunService:IsClient(),
IS_SERVER = RunService:IsServer(),
IS_TEST = false,
}
| 64 |
littensy/remo | littensy-remo-da8fe74/src/getSender.luau | local constants = require(script.Parent.constants)
local function getSender(player: any): Player?
if
constants.IS_SERVER
and (type(player) == "table" or typeof(player) == "Instance")
and player.ClassName == "Player"
then
return player :: Player
end
return nil
end
return getSender
| 72 |
littensy/remo | littensy-remo-da8fe74/src/middleware/loggerMiddleware.luau | local types = require(script.Parent.Parent.types)
local constants = require(script.Parent.Parent.constants)
local SCOPE = constants.IS_SERVER and "client → server" or "server → client"
local function stringify(...)
local output = {}
for index = 1, select("#", ...) do
local value = select(index, ...)
table.ins... | 317 |
littensy/remo | littensy-remo-da8fe74/src/middleware/throttleMiddleware.luau | local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local Promise = require(script.Parent.Parent.Promise)
local types = require(script.Parent.Parent.types)
local constants = require(script.Parent.Parent.constants)
local getSender = require(script.Parent.Parent.getSender)
local ... | 946 |
littensy/remo | littensy-remo-da8fe74/src/server/createRemote.luau | local Players = game:GetService("Players")
local Promise = require(script.Parent.Parent.Promise)
local types = require(script.Parent.Parent.types)
local compose = require(script.Parent.Parent.utils.compose)
local instances = require(script.Parent.Parent.utils.instances)
local testRemote = require(script.Parent.Parent... | 676 |
littensy/remo | littensy-remo-da8fe74/src/utils/compose.luau | local types = require(script.Parent.Parent.types)
local function compose(middlewares: { types.Middleware }): types.Middleware
local length = #middlewares
if length == 0 then
return function(next)
return next
end
elseif length == 1 then
return middlewares[1]
end
return function(next, ...)
for index = ... | 108 |
littensy/remo | littensy-remo-da8fe74/src/utils/instances.luau | local Promise = require(script.Parent.Parent.Promise)
local constants = require(script.Parent.Parent.constants)
local mockRemotes = require(script.Parent.mockRemotes)
local container = script.Parent.Parent.container
local function promiseRemoteFunction(name: string): Promise.Promise<RemoteFunction>
if container:Find... | 415 |
littensy/remo | littensy-remo-da8fe74/src/utils/unwrap.luau | local Promise = require(script.Parent.Parent.Promise)
type Promise<T> = Promise.Promise<T>
local function unwrap<T, U...>(promise: T | Promise<T>?, ...: U...): (T, U...)
if Promise.is(promise) then
return (promise :: Promise<T>):expect()
end
return promise :: T, ...
end
return unwrap
| 75 |
tacheometry/Rostar | tacheometry-Rostar-7b5d979/.lune/UnpackFiles.luau | local remodel = require("./remodel")
local fs = require("@lune/fs")
local serde = require("@lune/serde")
local informationFile = serde.decode("json", fs.readFile("RostarData.json"))
local initialRojoProject
do
local success, exists = pcall(remodel.isFile, informationFile.rojoProjectPath)
if success and exists then
... | 2,970 |
Epix-Incorporated/Adonis-Plugins | Epix-Incorporated-Adonis-Plugins-8629e36/Client/Client-AdonisChatAddition.luau | --[==[
File: Client-AdonisChatAddition.lua
Author: Coasterteam
Description: This is a client dep. that makes it so removing custom chat works properly
Last Updated: August 11th, 2024
Version: 1.0
]==]
return function(Vargs)
local client, service = Vargs.Client, Vargs.Service
client.UI.Remove = function(name,... | 156 |
Epix-Incorporated/Adonis-Plugins | Epix-Incorporated-Adonis-Plugins-8629e36/Server/Server-AutoChannelTabs.luau | --[[
Author: WalkerOfBacon
Name: Auto Channel Tabs
Description: This plugin will automatically add an "Admins" channel tab and remove unused team channel tabs.
Place in a ModuleScript under Adonis_Loader > Config > Plugins and named "Server-ChannelTab"
--]]
return function(Vargs)
local server, service = Vargs.Ser... | 564 |
Epix-Incorporated/Adonis-Plugins | Epix-Incorporated-Adonis-Plugins-8629e36/Server/Server-Banning API.luau | --[[
File: Server-Banning API.lua
Author: Coasterteam
Description: A temporary addition of the Banning API to allow Adonis to communicate with it.
This plugin should be used temporarily until Adonis fully implements the rewritten moderation systems (TBD)
Last Updated: June 26th, 2024
Version: 1.0
--]]
return f... | 3,355 |
Epix-Incorporated/Adonis-Plugins | Epix-Incorporated-Adonis-Plugins-8629e36/Server/Server-CMDsCooldownByLevel.luau | --!strict
----------
--[[ Info:
A plugin to automatically assign commands' cooldown depending on its rank.
]]
---------------------------------------------------------------------------------------------|
local CooldownsByLevel = {
--| Format: [AdminLevel] = {Player = <Seconds>, Server = <Seconds>, CrossServer = <S... | 346 |
Epix-Incorporated/Adonis-Plugins | Epix-Incorporated-Adonis-Plugins-8629e36/Server/Server-Command_Remover.luau | --!strict
--[[
Author: Sceleratis (Davey_Bones)
Description: This plugin will remove certain commands
Place in a ModuleScript under Adonis_Loader > Config > Plugins and named "Server-Command_Remover"
--]]
local COMMANDS_TO_REMOVE: {string} = { --// List of command indices or names to remove
"kill",
"DonorHat",
... | 227 |
Epix-Incorporated/Adonis-Plugins | Epix-Incorporated-Adonis-Plugins-8629e36/Server/Server-CustomRankCommand.luau | return function(Vargs)
local server, service = Vargs.Server, Vargs.Service
local Settings = server.Settings
local Commands = server.Commands
local Functions = server.Functions
local Admin = server.Admin
Commands.VIP = {
Prefix = Settings.Prefix;
Commands = {"vip"};
... | 253 |
Epix-Incorporated/Adonis-Plugins | Epix-Incorporated-Adonis-Plugins-8629e36/Server/Server-DisableOldlogs.luau | --!nonstrict
--[[
Author: joritochip
Name: Disable oldlogs
Description: This plugin allows you to fully disable Adonis old logs
Place in a ModuleScript under Adonis_Loader > Config > Plugins and named "Server-DisableOldlogs"
--]]
return function(Vargs)
local server, service = Vargs.Server, Vargs.Service
server.... | 169 |
Epix-Incorporated/Adonis-Plugins | Epix-Incorporated-Adonis-Plugins-8629e36/Server/Server-DiscordWebhookLogs.luau | --!nonstrict
--[[
Original Author: crywink
Rewrite Author: Expertcoderz
Name: Server-DiscordWebhookLogs
Description: Enables logging of commands to a Discord webhook
Place in a ModuleScript under Adonis_Loader > Config > Plugins, named "Server-DiscordWebhookLogs"
NOTICE: Discord has blocked Roblox from sending ... | 832 |
Epix-Incorporated/Adonis-Plugins | Epix-Incorporated-Adonis-Plugins-8629e36/Server/Server-Free_Admin.luau | --!nonstrict
--[[
Author: Sceleratis (Davey_Bones)
Description: This plugin gives admin to every non-admin player who joins
Place in a ModuleScript under Adonis_Loader > Config > Plugins, named "Server-Free_Admin"
--]]
local FREE_ADMIN_LEVEL: number = 100 --// Level of admin to give everyone; rank levels are defin... | 311 |
Epix-Incorporated/Adonis-Plugins | Epix-Incorporated-Adonis-Plugins-8629e36/Server/Server-Gear_Blacklist.luau | --!nonstrict
--[[
Name: Gear Blacklist
Author: Sceleratis (Davey_Bones)
Description: This plugins allows for the blacklisting of certain IDs from the :gear command
Place in a ModuleScript under Adonis_Loader > Config > Plugins and name it "Server-Gear_Blacklist"
--]]
local BLACKLISTED_GEAR_IDS: {number} = { --// ... | 347 |
Epix-Incorporated/Adonis-Plugins | Epix-Incorporated-Adonis-Plugins-8629e36/Server/Server-Leaderstat_Protector.luau | --!nonstrict
--[[
Author: Expertcoderz
Description: Prevents certain leaderstat values from being changed by admins using :change, :add or :subtract
Place this in a ModuleScript under Adonis_Loader > Config > Plugins and name it "Server-Leaderstat_Protector"
]]
type Permission = string|number|{string|number}
--//... | 355 |
Epix-Incorporated/Adonis-Plugins | Epix-Incorporated-Adonis-Plugins-8629e36/Server/Server-PlayerCollisions.luau | --!nonstrict
--[[
Author: Sceleratis (Davey_Bones)
Name: Server-NoPlayerCollide
Description: Adds :collisions, :nocollide, :resetcollisions and :setdefaultcollision commands;
enables/disables character-to-character collisions per player
Place in a ModuleScript under Adonis_Loader > Config > Plugins, named "Se... | 1,483 |
Epix-Incorporated/Adonis-Plugins | Epix-Incorporated-Adonis-Plugins-8629e36/Server/Server-PlayerSelector_Restrictor.luau | --!strict
--[[
Author: Sceleratis/Davey_Bones and Expertcoderz
Description: This plugin will restrict any player selectors
(all, others, me, etc.) to a specific admin level only.
This plugin can also protect admins with certain
levels from being selected using player selectors.
Place this ModuleScrip... | 867 |
Epix-Incorporated/Adonis-Plugins | Epix-Incorporated-Adonis-Plugins-8629e36/Server/Server-PrivateServerOwnerAdmin.luau | --!strict
--[[
Original Author: TacoBellSaucePackets
Original Source: https://devforum.roblox.com/t/adonis-g-api-usage/477194/4
Description: This plugin will give a certain temporary permission level to private server owners
Place this ModuleScript in Adonis_Loader > Config > Plugins and name it "Server-PrivateSer... | 254 |
Epix-Incorporated/Adonis-Plugins | Epix-Incorporated-Adonis-Plugins-8629e36/Server/Server-RemoteAdmin.luau | --!nonstrict
--[[
Author: EasternBloxxer
Description: This plugin enables the setting of certain players' admin ranks via a BindableEvent
Place in a ModuleScript under Adonis_Loader > Config > Plugins and named "Server-RemoteAdmin"
Usage:
AdminRemote:Fire(player: Player, key: string, adminLevel: string | number... | 421 |
Epix-Incorporated/Adonis-Plugins | Epix-Incorporated-Adonis-Plugins-8629e36/Server/Server-Uninspiration.luau | --!strict
--[[
Author: pbstFusion
Name: Server-Uninspiration
Description: To provide people with text that is not vaguely inspiring, nor helpful.
Place in a ModuleScript under Adonis_Loader > Config > Plugins, named "Server-Uninspiration"
--]]
return function(Vargs)
local server, service = Vargs.Server, Vargs.Se... | 457 |
MadStudioRoblox/Sera | MadStudioRoblox-Sera-1d0c7ce/Sera.luau | --!strict
--!native
--[[
MAD STUDIO
-[Sera]---------------------------------------
Low-level schematized serialization library
Members:
Sera.Boolean
Sera.Uint8
Sera.Uint16
Sera.Uint32
Sera.Int8
Sera.Int16
Sera.Int32
Sera.Float32
Sera.Float64
Sera.CFrame -- 48 bytes; Full precision
Sera.Lo... | 5,786 |
latte-soft/maui | latte-soft-maui-99e1d35/src/Tarmac/Assets.lua | -- This file was @generated by Tarmac. It is not intended for manual editing.
return {
["MauiLogo-DarkMode"] = "rbxassetid://12558365376",
["MauiLogo-LightMode"] = "rbxassetid://12558365512",
} | 63 |
gaymeowing/luauberries | gaymeowing-luauberries-056d795/libs/badger/init.luau |
--[[
badger
badge service wrapper
]]
local BadgeService = game:GetService("BadgeService")
local RunService = game:GetService("RunService")
local Players = game:GetService("Players")
export type Badge = {
index: number,
id: number,
}
type PlayerInfo = {
threads_waiting_for_id: { [number]: { thread } },
threads... | 1,893 |
gaymeowing/luauberries | gaymeowing-luauberries-056d795/libs/character/init.luau |
--[[
character
simple utility module for getting accurate character types,
and with a special added function that also runs the callback
if the player already has a character
]]
local Players = game:GetService("Players")
export type Character = Model & {
Humanoid: Humanoid & {
HumanoidDescription: Hu... | 1,312 |
gaymeowing/luauberries | gaymeowing-luauberries-056d795/libs/cross/init.luau | --!nocheck
--!nolint
--[[
cross
basic cross runtime utility, covering the bear nessisities
]]
local cross_task = require("@self/task")
local cross_warn = require("@self/warn")
type Runtime = "Roblox" | "Lune" | "Unknown" | "Lute"
local RUNTIME: Runtime = if game and workspace then
"Roblox"
elseif string.find(_... | 393 |
gaymeowing/luauberries | gaymeowing-luauberries-056d795/libs/cross/task.luau |
--[[
task
a good enough pure luau version of roblox's task lib
that doesn't require wrapping ur whole script in a
task.spawn or anything
]]
local function SPAWN<A..., R...>(
thread_or_func: thread | (A...) -> R...,
...: A...
): thread
if type(thread_or_func) == "thread" then
coroutine.resume(thread_or_func, ... | 364 |
gaymeowing/luauberries | gaymeowing-luauberries-056d795/libs/cross/warn.luau | --!native
--[[
warn
pure luau version of roblox's warn global
]]
local function warn(...: unknown)
print(`\27[0;33m{table.concat({ ... }, " ")}\27[0m`)
end
return warn | 57 |
gaymeowing/luauberries | gaymeowing-luauberries-056d795/libs/grouper/init.luau | --!optimize 2
--!native
--[[
Grouper
Used for getting the latest group rank or role of a player on the server,
and reducing groups api requests as only the server will make the requests
and then send down the rank & role for a player.
Rather than using Player:GetRankInGroup() on the client,
and end up constant... | 2,154 |
gaymeowing/luauberries | gaymeowing-luauberries-056d795/libs/leaderstats/init.luau |
--[[
leaderstats
roblox leaderstats wrapper providing a nicer api, compared to dealing with instances directly
]]
local RunService = game:GetService("RunService")
local Players = game:GetService("Players")
type AllowedValues = number | string
type AllowedDefaults = "float" | "string" | "integer" | AllowedValues
... | 2,181 |
gaymeowing/luauberries | gaymeowing-luauberries-056d795/libs/loganalytics/init.luau |
--[[
loganalytics
a simple wrapper around AnalyticsService's bad api, that makes it into a decent api
]]
local AnalyticsService = game:GetService("AnalyticsService")
export type CustomFields = { [string]: string }
type ConvertedCustomFields = { [Enum.AnalyticsCustomFieldKeys]: string }?
type BaseAnalyticsInfo = ... | 1,296 |
gaymeowing/luauberries | gaymeowing-luauberries-056d795/libs/pagesutil/init.luau |
--[[
pagesutil
utility for dealing with roblox page instances easily
]]
export type PageInfo = {
item_index: number,
page_len: number,
page: number,
}
local ADVANCE_ERR_FORMAT = "[PAGES]: an error occurred while trying to advance to the next page\n\tadvance-next-page-err: %s"
local pagesutil = {}
function pag... | 555 |
gaymeowing/luauberries | gaymeowing-luauberries-056d795/libs/playerloaded/init.luau |
--[[
player loaded
handles callbacks for a player loaded remote, because having a player loaded remote
is a good idea so you don't fill up the remote queue for a player
before they've been able to receive remote events
]]
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local RunService = game:GetSe... | 1,192 |
gaymeowing/luauberries | gaymeowing-luauberries-056d795/libs/playerzone/init.luau | --!native
--[[
playerzone
simple util module for detecting players in rectangular zones
]]
local RunService = game:GetService("RunService")
local Players = game:GetService("Players")
local character = require("@libs/character")
export type ZoneType = "WHITELIST" | "BLACKLIST"
type BaseZone = {
callback: (charact... | 1,526 |
gaymeowing/luauberries | gaymeowing-luauberries-056d795/libs/plugtilly/init.luau |
--[[
plugtilly
roblox plugin utility
]]
export type DockWidgetPluginGuiInfo = {
initally_enabled_should_override_restore: boolean,
inital_dock_state: Enum.InitialDockState,
initally_enabled: boolean,
inital_size: vector,
min_size: vector?,
title: string?,
}
export type Setting<V> = (value: V?) -> V
local SE... | 752 |
gaymeowing/luauberries | gaymeowing-luauberries-056d795/libs/race/init.luau |
--[[
race
a function for getting the first return out of a vararg of functions
]]
local cross = require("@libs/cross")
local function callback_handler<A..., R...>(
f: (A...) -> R..., threads: { thread },
main_thread: thread, ...: A...
)
local callback_thread = coroutine.running()
local results = { f(...) }
f... | 230 |
gaymeowing/luauberries | gaymeowing-luauberries-056d795/libs/random/init.luau | --!native
--[[
random
pure luau functional equivalent to Roblox's random class
]]
type SetState<V> = (v: V) -> ()
type MinMaxMethod<S, MIN, MAX, R> = (set_state: SetState<S>, min: MIN, max: MAX, seed: S) -> R
type Method<S, V, R...> = (set_state: SetState<S>, v: V, seed: S) -> R...
--[[
Generates pseudorandom n... | 1,870 |
gaymeowing/luauberries | gaymeowing-luauberries-056d795/libs/rbxdeeplink/init.luau | --!native
--[[
rbx deeplink
utility functions for dealing w roblox deeplinks
]]
local url = require("@libs/url")
local REGULAR_FORMAT = "https://www.roblox.com/games/start?placeId=%*&launchData=%*"
local APPSFLYER_FORMAT = "https://ro.blox.com/Ebh5?af_dp=%*&af_web_dp=%*"
local DATA_LEN_LIMIT = 200
local DATA_LEN_E... | 423 |
gaymeowing/luauberries | gaymeowing-luauberries-056d795/libs/rbxsafeconn/init.luau |
--[[
rbxsafeconn
utility for safely connecting to commonly used events where you'd also iterate through some instances
]]
local CollectionService = game:GetService("CollectionService")
local Players = game:GetService("Players")
local character = require("@libs/character")
local PLAYER_ADDED = Players.PlayerAdded
... | 276 |
gaymeowing/luauberries | gaymeowing-luauberries-056d795/libs/rbxthumb/init.luau |
--[[
rbxthumb
module for easily creating roblox thumbnail urls, based on Nevermore's rbxthumbutil
although with types
]]
type PlayerThumbnailFormatter<S> = (player: Player, size: S?, circular: boolean?) -> Content
type ThumbnailFormatter<S> = (id: number, size: S?, circular: boolean?) -> Content
export type Thumb... | 1,341 |
gaymeowing/luauberries | gaymeowing-luauberries-056d795/libs/retryer/init.luau | --!native
--[[
Retryer
Utility for retrying functions easily
]]
local cross = require("@libs/cross")
local WAIT = cross.wait
local function INSURE_MAX_RETRIES_GREATER_THAN_ONE(max_retries: number)
if max_retries <= 1 then
error("[RETRYER]: max_retries cannot be less than 2")
end
end
local retryer = {}
--[[
... | 1,333 |
gaymeowing/luauberries | gaymeowing-luauberries-056d795/libs/safe-teleport/init.luau |
--[[
safe teleport
wrapper for TeleportService:TeleportAsync() with automatic retries, and a better typed api
based on the SafeTeleport example function on Roblox's docs:
https://create.roblox.com/docs/projects/teleport#handle-failed-teleports
]]
local TeleportService = game:GetService("TeleportService")
local re... | 1,699 |
gaymeowing/luauberries | gaymeowing-luauberries-056d795/libs/stack-tree/init.luau | --!native
--[[
stack tree
library for generating tree structures for nodes on a shelf
to prevent floating nodes from ever happening
]]
local random = require("@libs/random")
export type FaceTowardsSide = "Front" | "Back" | "Left" | "Right"
-- TaperType names are referring to roof types, ie bloxburg roof types
exp... | 4,732 |
gaymeowing/luauberries | gaymeowing-luauberries-056d795/libs/textchat/init.luau |
--[[
textchat
utility for TextChatService, making adding/removing, and muting TextSources easier
alongside providing some utilities for chat visuals
]]
local TextChatService = game:GetService("TextChatService")
local RunService = game:GetService("RunService")
local Players = game:GetService("Players")
type UserId... | 1,595 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.