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 |
|---|---|---|---|---|---|
TheNexusAvenger/Nexus-Admin | TheNexusAvenger-Nexus-Admin-d9465ce/src/IncludedCommands/UsefulFun/clone.luau | luau | .luau | --Implementation of a command.
--!strict
local IncludedCommandUtil = require(script.Parent.Parent:WaitForChild("IncludedCommandUtil"))
local Types = require(script.Parent.Parent.Parent:WaitForChild("Types"))
return {
Keyword = "clone",
Category = "UsefulFunCommands",
Description = "Clones the character of... | 222 |
TheNexusAvenger/Nexus-Admin | TheNexusAvenger-Nexus-Admin-d9465ce/src/IncludedCommands/UsefulFun/collide.luau | luau | .luau | --Implementation of a command.
--!strict
local IncludedCommandUtil = require(script.Parent.Parent:WaitForChild("IncludedCommandUtil"))
local Types = require(script.Parent.Parent.Parent:WaitForChild("Types"))
return {
Keyword = "collide",
Category = "UsefulFunCommands",
Description = "Makes a set of player... | 291 |
TheNexusAvenger/Nexus-Admin | TheNexusAvenger-Nexus-Admin-d9465ce/src/IncludedCommands/UsefulFun/damage.luau | luau | .luau | --Implementation of a command.
--!strict
local Types = require(script.Parent.Parent.Parent:WaitForChild("Types"))
return {
Keyword = "damage",
Category = "UsefulFunCommands",
Description = "Damages a given set of players, ignoring force fields.",
Arguments = {
{
Type = "nexusAdminP... | 202 |
TheNexusAvenger/Nexus-Admin | TheNexusAvenger-Nexus-Admin-d9465ce/src/IncludedCommands/UsefulFun/explode.luau | luau | .luau | --Implementation of a command.
--!strict
local Workspace = game:GetService("Workspace")
local Types = require(script.Parent.Parent.Parent:WaitForChild("Types"))
return {
Keyword = "explode",
Category = "UsefulFunCommands",
Description = "Explodes a set of players.",
Arguments = {
{
... | 208 |
TheNexusAvenger/Nexus-Admin | TheNexusAvenger-Nexus-Admin-d9465ce/src/IncludedCommands/UsefulFun/ff.luau | luau | .luau | --Implementation of a command.
--!strict
local Types = require(script.Parent.Parent.Parent:WaitForChild("Types"))
return {
Keyword = "ff",
Category = "UsefulFunCommands",
Description = "Adds a force field to the given players.",
Arguments = {
{
Type = "nexusAdminPlayers",
... | 228 |
TheNexusAvenger/Nexus-Admin | TheNexusAvenger-Nexus-Admin-d9465ce/src/IncludedCommands/UsefulFun/fling.luau | luau | .luau | --Implementation of a command.
--!strict
local Players = game:GetService("Players")
local IncludedCommandUtil = require(script.Parent.Parent:WaitForChild("IncludedCommandUtil"))
local Types = require(script.Parent.Parent.Parent:WaitForChild("Types"))
return {
Keyword = "fling",
Category = "UsefulFunCommands"... | 527 |
TheNexusAvenger/Nexus-Admin | TheNexusAvenger-Nexus-Admin-d9465ce/src/IncludedCommands/UsefulFun/flip.luau | luau | .luau | --Implementation of a command.
--!strict
local Types = require(script.Parent.Parent.Parent:WaitForChild("Types"))
return {
Keyword = "flip",
Category = "UsefulFunCommands",
Description = "Flips a set of players.",
Arguments = {
{
Type = "nexusAdminPlayers",
Name = "Play... | 191 |
TheNexusAvenger/Nexus-Admin | TheNexusAvenger-Nexus-Admin-d9465ce/src/IncludedCommands/UsefulFun/fly.luau | luau | .luau | --Implementation of a command.
--!strict
local UserInputService = game:GetService("UserInputService")
local FlyState = require(script.Parent.Parent:WaitForChild("Resources"):WaitForChild("FlyState"))
local Types = require(script.Parent.Parent.Parent:WaitForChild("Types"))
return {
Keyword = "fly",
Category =... | 267 |
TheNexusAvenger/Nexus-Admin | TheNexusAvenger-Nexus-Admin-d9465ce/src/IncludedCommands/UsefulFun/freeze.luau | luau | .luau | --Implementation of a command.
--!strict
local Types = require(script.Parent.Parent.Parent:WaitForChild("Types"))
return {
Keyword = "freeze",
Category = "UsefulFunCommands",
Description = "Freezes the character of the given players.",
Arguments = {
{
Type = "nexusAdminPlayers",
... | 169 |
TheNexusAvenger/Nexus-Admin | TheNexusAvenger-Nexus-Admin-d9465ce/src/IncludedCommands/UsefulFun/god.luau | luau | .luau | --Implementation of a command.
--!strict
local Types = require(script.Parent.Parent.Parent:WaitForChild("Types"))
return {
Keyword = "god",
Category = "UsefulFunCommands",
Description = "Heals a set of players, and makes their health infinite.",
Arguments = {
{
Type = "nexusAdminPl... | 187 |
TheNexusAvenger/Nexus-Admin | TheNexusAvenger-Nexus-Admin-d9465ce/src/IncludedCommands/UsefulFun/grav.luau | luau | .luau | --Implementation of a command.
--!strict
local Workspace = game:GetService("Workspace")
local Types = require(script.Parent.Parent.Parent:WaitForChild("Types"))
return {
Keyword = {"grav", "setgrav"},
Category = "UsefulFunCommands",
Description = "Sets the gravity of a set of players.",
Arguments = {... | 417 |
TheNexusAvenger/Nexus-Admin | TheNexusAvenger-Nexus-Admin-d9465ce/src/IncludedCommands/UsefulFun/heal.luau | luau | .luau | --Implementation of a command.
--!strict
local Types = require(script.Parent.Parent.Parent:WaitForChild("Types"))
return {
Keyword = "heal",
Category = "UsefulFunCommands",
Description = "Heals a set of players.",
Arguments = {
{
Type = "nexusAdminPlayers",
Name = "Play... | 173 |
TheNexusAvenger/Nexus-Admin | TheNexusAvenger-Nexus-Admin-d9465ce/src/IncludedCommands/UsefulFun/health.luau | luau | .luau | --Implementation of a command.
--!strict
local Types = require(script.Parent.Parent.Parent:WaitForChild("Types"))
return {
Keyword = "health",
Category = "UsefulFunCommands",
Description = "Heals a set of players, and sets their max health.",
Arguments = {
{
Type = "nexusAdminPlaye... | 213 |
TheNexusAvenger/Nexus-Admin | TheNexusAvenger-Nexus-Admin-d9465ce/src/IncludedCommands/UsefulFun/jail.luau | luau | .luau | --Implementation of a command.
--!strict
local IncludedCommandUtil = require(script.Parent.Parent:WaitForChild("IncludedCommandUtil"))
local Types = require(script.Parent.Parent.Parent:WaitForChild("Types"))
return {
Keyword = "jail",
Category = "UsefulFunCommands",
Description = "Creates a jail around a ... | 1,356 |
TheNexusAvenger/Nexus-Admin | TheNexusAvenger-Nexus-Admin-d9465ce/src/IncludedCommands/UsefulFun/jump.luau | luau | .luau | --Implementation of a command.
--!strict
local Types = require(script.Parent.Parent.Parent:WaitForChild("Types"))
return {
Keyword = "jump",
Category = "UsefulFunCommands",
Description = "Jumps a set of players.",
Arguments = {
{
Type = "nexusAdminPlayers",
Name = "Play... | 170 |
TheNexusAvenger/Nexus-Admin | TheNexusAvenger-Nexus-Admin-d9465ce/src/IncludedCommands/UsefulFun/jumpheight.luau | luau | .luau | --Implementation of a command.
--!strict
local Types = require(script.Parent.Parent.Parent:WaitForChild("Types"))
return {
Keyword = "jumpheight",
Category = "UsefulFunCommands",
Description = "Sets the jump height of the given players.",
Arguments = {
{
Type = "nexusAdminPlayers",... | 228 |
TheNexusAvenger/Nexus-Admin | TheNexusAvenger-Nexus-Admin-d9465ce/src/IncludedCommands/UsefulFun/jumppower.luau | luau | .luau | --Implementation of a command.
--!strict
local Types = require(script.Parent.Parent.Parent:WaitForChild("Types"))
return {
Keyword = "jumppower",
Category = "UsefulFunCommands",
Description = "Sets the jump power of the given players.",
Arguments = {
{
Type = "nexusAdminPlayers",
... | 228 |
TheNexusAvenger/Nexus-Admin | TheNexusAvenger-Nexus-Admin-d9465ce/src/IncludedCommands/UsefulFun/kill.luau | luau | .luau | --Implementation of a command.
--!strict
local Types = require(script.Parent.Parent.Parent:WaitForChild("Types"))
return {
Keyword = "kill",
Category = "UsefulFunCommands",
Description = "Kills a given set of players.",
Arguments = {
{
Type = "nexusAdminPlayers",
Name =... | 171 |
TheNexusAvenger/Nexus-Admin | TheNexusAvenger-Nexus-Admin-d9465ce/src/IncludedCommands/UsefulFun/lock.luau | luau | .luau | --Implementation of a command.
--!strict
local Types = require(script.Parent.Parent.Parent:WaitForChild("Types"))
return {
Keyword = "lock",
Category = "UsefulFunCommands",
Description = "Locks the character of the given players.",
Arguments = {
{
Type = "nexusAdminPlayers",
... | 168 |
TheNexusAvenger/Nexus-Admin | TheNexusAvenger-Nexus-Admin-d9465ce/src/IncludedCommands/UsefulFun/place.luau | luau | .luau | --Implementation of a command.
--!strict
local TeleportService = game:GetService("TeleportService")
local Types = require(script.Parent.Parent.Parent:WaitForChild("Types"))
return {
Keyword = "place",
Category = "UsefulFunCommands",
Description = "Teleports a set of players to the given place.",
Argu... | 181 |
TheNexusAvenger/Nexus-Admin | TheNexusAvenger-Nexus-Admin-d9465ce/src/IncludedCommands/UsefulFun/sit.luau | luau | .luau | --Implementation of a command.
--!strict
local Types = require(script.Parent.Parent.Parent:WaitForChild("Types"))
return {
Keyword = "sit",
Category = "UsefulFunCommands",
Description = "Sits a set of players.",
Arguments = {
{
Type = "nexusAdminPlayers",
Name = "Player... | 170 |
TheNexusAvenger/Nexus-Admin | TheNexusAvenger-Nexus-Admin-d9465ce/src/IncludedCommands/UsefulFun/stun.luau | luau | .luau | --Implementation of a command.
--!strict
local Types = require(script.Parent.Parent.Parent:WaitForChild("Types"))
return {
Keyword = "stun",
Category = "UsefulFunCommands",
Description = "Stuns a set of players.",
Arguments = {
{
Type = "nexusAdminPlayers",
Name = "Play... | 171 |
TheNexusAvenger/Nexus-Admin | TheNexusAvenger-Nexus-Admin-d9465ce/src/IncludedCommands/UsefulFun/thaw.luau | luau | .luau | --Implementation of a command.
--!strict
local Types = require(script.Parent.Parent.Parent:WaitForChild("Types"))
return {
Keyword = {"thaw", "unfreeze"},
Category = "UsefulFunCommands",
Description = "Thaws the character of the given players.",
Arguments = {
{
Type = "nexusAdminPl... | 174 |
TheNexusAvenger/Nexus-Admin | TheNexusAvenger-Nexus-Admin-d9465ce/src/IncludedCommands/UsefulFun/thru.luau | luau | .luau | --Implementation of a command.
--!strict
local Types = require(script.Parent.Parent.Parent:WaitForChild("Types"))
return {
Keyword = "thru",
Category = "UsefulFunCommands",
Description = "Teleports a set of players forward a given amount of studs.",
Arguments = {
{
Type = "nexusAdm... | 241 |
TheNexusAvenger/Nexus-Admin | TheNexusAvenger-Nexus-Admin-d9465ce/src/IncludedCommands/UsefulFun/tp.luau | luau | .luau | --Implementation of a command.
--!strict
local IncludedCommandUtil = require(script.Parent.Parent:WaitForChild("IncludedCommandUtil"))
local Types = require(script.Parent.Parent.Parent:WaitForChild("Types"))
return {
Keyword = "tp",
Category = "UsefulFunCommands",
Description = "Teleports a set of players... | 366 |
TheNexusAvenger/Nexus-Admin | TheNexusAvenger-Nexus-Admin-d9465ce/src/IncludedCommands/UsefulFun/tpto.luau | luau | .luau | --Implementation of a command.
--!strict
local IncludedCommandUtil = require(script.Parent.Parent:WaitForChild("IncludedCommandUtil"))
local Types = require(script.Parent.Parent.Parent:WaitForChild("Types"))
return {
Keyword = "tpto",
Category = "UsefulFunCommands",
Description = "Teleports a set of playe... | 267 |
TheNexusAvenger/Nexus-Admin | TheNexusAvenger-Nexus-Admin-d9465ce/src/IncludedCommands/UsefulFun/unff.luau | luau | .luau | --Implementation of a command.
--!strict
local Types = require(script.Parent.Parent.Parent:WaitForChild("Types"))
return {
Keyword = "unff",
Category = "UsefulFunCommands",
Description = "Removes all force fields from the given players.",
Arguments = {
{
Type = "nexusAdminPlayers",... | 175 |
TheNexusAvenger/Nexus-Admin | TheNexusAvenger-Nexus-Admin-d9465ce/src/IncludedCommands/UsefulFun/unfly.luau | luau | .luau | --Implementation of a command.
--!strict
local Types = require(script.Parent.Parent.Parent:WaitForChild("Types"))
local FlyState = require(script.Parent.Parent:WaitForChild("Resources"):WaitForChild("FlyState"))
return {
Keyword = "unfly",
Category = "UsefulFunCommands",
Description = "Removes flight fro... | 154 |
TheNexusAvenger/Nexus-Admin | TheNexusAvenger-Nexus-Admin-d9465ce/src/IncludedCommands/UsefulFun/ungod.luau | luau | .luau | --Implementation of a command.
--!strict
local Types = require(script.Parent.Parent.Parent:WaitForChild("Types"))
return {
Keyword = "ungod",
Category = "UsefulFunCommands",
Description = "Sets the max health of the given players 100.",
Arguments = {
{
Type = "nexusAdminPlayers",
... | 185 |
TheNexusAvenger/Nexus-Admin | TheNexusAvenger-Nexus-Admin-d9465ce/src/IncludedCommands/UsefulFun/unjail.luau | luau | .luau | --Implementation of a command.
--!strict
local IncludedCommandUtil = require(script.Parent.Parent:WaitForChild("IncludedCommandUtil"))
local Types = require(script.Parent.Parent.Parent:WaitForChild("Types"))
return {
Keyword = "unjail",
Category = "UsefulFunCommands",
Description = "Unjails a set of playe... | 229 |
TheNexusAvenger/Nexus-Admin | TheNexusAvenger-Nexus-Admin-d9465ce/src/IncludedCommands/UsefulFun/unlock.luau | luau | .luau | --Implementation of a command.
--!strict
local Types = require(script.Parent.Parent.Parent:WaitForChild("Types"))
return {
Keyword = "unlock",
Category = "UsefulFunCommands",
Description = "Unlocks the character of the given players.",
Arguments = {
{
Type = "nexusAdminPlayers",
... | 168 |
TheNexusAvenger/Nexus-Admin | TheNexusAvenger-Nexus-Admin-d9465ce/src/IncludedCommands/UsefulFun/unname.luau | luau | .luau | --Implementation of a command.
--!strict
local Types = require(script.Parent.Parent.Parent:WaitForChild("Types"))
return {
Keyword = "unname",
Category = "UsefulFunCommands",
Description = "Removes the name of a player's character from :name.",
Arguments = {
{
Type = "nexusAdminPla... | 177 |
TheNexusAvenger/Nexus-Admin | TheNexusAvenger-Nexus-Admin-d9465ce/src/IncludedCommands/UsefulFun/unstun.luau | luau | .luau | --Implementation of a command.
--!strict
local Types = require(script.Parent.Parent.Parent:WaitForChild("Types"))
return {
Keyword = "unstun",
Category = "UsefulFunCommands",
Description = "Unstuns a set of players.",
Arguments = {
{
Type = "nexusAdminPlayers",
Name = "... | 174 |
TheNexusAvenger/Nexus-Admin | TheNexusAvenger-Nexus-Admin-d9465ce/src/IncludedCommands/UsefulFun/walkspeed.luau | luau | .luau | --Implementation of a command.
--!strict
local Types = require(script.Parent.Parent.Parent:WaitForChild("Types"))
return {
Keyword = {"walkspeed", "speed"},
Category = "UsefulFunCommands",
Description = "Sets the walkspeeds of the given players.",
Arguments = {
{
Type = "nexusAdmin... | 209 |
TheNexusAvenger/Nexus-Admin | TheNexusAvenger-Nexus-Admin-d9465ce/src/IncludedCommands/UsefulFun/where.luau | luau | .luau | --Implementation of a command.
--!strict
local IncludedCommandUtil = require(script.Parent.Parent:WaitForChild("IncludedCommandUtil"))
local Types = require(script.Parent.Parent.Parent:WaitForChild("Types"))
return {
Keyword = "where",
Category = "UsefulFunCommands",
Description = "Displays the positions ... | 406 |
TheNexusAvenger/Nexus-Admin | TheNexusAvenger-Nexus-Admin-d9465ce/src/Resources/NexusAdminClientLoader.server.luau | luau | .luau | --Loads Nexus Admin on the client.
--!strict
local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local GuiService = game:GetService("GuiService")
local ContextActionService = game:GetService("ContextActionService")
local NexusAdminClient = require(ReplicatedStorag... | 727 |
TheNexusAvenger/Nexus-Admin | TheNexusAvenger-Nexus-Admin-d9465ce/src/Server/Replicator.luau | luau | .luau | --Replicates instances to players.
--!strict
local Players = game:GetService("Players")
local StarterPlayerScripts = game:GetService("StarterPlayer"):WaitForChild("StarterPlayerScripts")
local Replicator = {}
Replicator.__index = Replicator
export type Replicator = typeof(setmetatable({}, Replicator))
--[[
Create... | 371 |
TheNexusAvenger/Nexus-Admin | TheNexusAvenger-Nexus-Admin-d9465ce/src/Server/ServerAuthorization.luau | luau | .luau | --Handles users being authorized.
--!strict
local GROUP_LEVEL_CACHE_EXPIRE_SECONDS = 30 * 60
local Players = game:GetService("Players")
local GroupService = game:GetService("GroupService")
local Authorization = require(script.Parent.Parent:WaitForChild("Common"):WaitForChild("Authorization"))
local Configuration = r... | 1,371 |
TheNexusAvenger/Nexus-Admin | TheNexusAvenger-Nexus-Admin-d9465ce/src/Server/ServerFilter.luau | luau | .luau | --Filters strings to comply with Roblox's filtering rules.
--!strict
local Filter = require(script.Parent.Parent:WaitForChild("Common"):WaitForChild("Filter"))
local ServerFilter = {}
ServerFilter.__index = ServerFilter
setmetatable(ServerFilter, Filter)
export type ServerFilter = typeof(setmetatable({}, ServerFilte... | 917 |
TheNexusAvenger/Nexus-Admin | TheNexusAvenger-Nexus-Admin-d9465ce/src/Server/ServerLogsRegistry.luau | luau | .luau | --Manages logs that are streamed to clients on the server.
--!strict
local Players = game:GetService("Players")
local Types = require(script.Parent.Parent:WaitForChild("Types"))
local ServerLogsRegistry = {}
ServerLogsRegistry.__index = ServerLogsRegistry
type LogDataEntry = {
MinimumAdminLevel: number,
Lis... | 865 |
TheNexusAvenger/Nexus-Admin | TheNexusAvenger-Nexus-Admin-d9465ce/src/Server/ServerMessages.luau | luau | .luau | --Sends messages to players.
--!strict
local ServerMessages = {}
ServerMessages.__index = ServerMessages
export type ServerMessages = {
DisplayHintEvent: RemoteEvent,
DisplayMessageEvent: RemoteEvent,
DisplayNotificationEvent: RemoteEvent,
} & typeof(setmetatable({}, ServerMessages))
--[[
Creates a ser... | 447 |
PossiblePanda/QueryAuth | PossiblePanda-QueryAuth-d5bcf8a/lib/DefaultAuthConditions/AccountAge.luau | luau | .luau | local QueryAuthTypes = require(script.Parent.Parent.Types)
type AuthCondition = QueryAuthTypes.AuthCondition
--[=[
Checks if a player's account age meets the specified minimum and maximum days.
@function AccountAge
@within QueryAuth
@param minimum number -- Minimum account age in days.
@param maximum number? -- ... | 153 |
PossiblePanda/QueryAuth | PossiblePanda-QueryAuth-d5bcf8a/lib/DefaultAuthConditions/Badge.luau | luau | .luau | local BadgeService = game:GetService("BadgeService")
local QueryAuthTypes = require(script.Parent.Parent.Types)
type AuthCondition = QueryAuthTypes.AuthCondition
--[=[
Checks if the player owns the badge with the given badge ID.
@function Badge
@within QueryAuth
@param badgeId number -- The badge ID to check agai... | 131 |
PossiblePanda/QueryAuth | PossiblePanda-QueryAuth-d5bcf8a/lib/DefaultAuthConditions/FriendsWith.luau | luau | .luau | local QueryAuthTypes = require(script.Parent.Parent.Types)
type AuthCondition = QueryAuthTypes.AuthCondition
--[[
Checks to see if the player is friends with another player.
@function FriendsWith
@within QueryAuth
@param otherPlayerId number -- The UserId of the other player to check friendship with.
@return Aut... | 120 |
PossiblePanda/QueryAuth | PossiblePanda-QueryAuth-d5bcf8a/lib/DefaultAuthConditions/Gamepass.luau | luau | .luau | local MarketplaceService = game:GetService("MarketplaceService")
local QueryAuthTypes = require(script.Parent.Parent.Types)
type AuthCondition = QueryAuthTypes.AuthCondition
--[=[
Checks if the player owns the gamepass with the given asset ID.
@function Gamepass
@within QueryAuth
@param gamepass number -- The gam... | 139 |
PossiblePanda/QueryAuth | PossiblePanda-QueryAuth-d5bcf8a/lib/DefaultAuthConditions/GlobalThrottle.luau | luau | .luau | --[=[
A global time-based rate limiter, only returning true if you call it less than `times` amount of times within the `timeFrame` amount of time.
@function GlobalThrottle
@within QueryAuth
@param timeFrame number -- The amount of time (seconds by default) between resetting the amount of calls that can happen.
@p... | 292 |
PossiblePanda/QueryAuth | PossiblePanda-QueryAuth-d5bcf8a/lib/DefaultAuthConditions/Group.luau | luau | .luau | local GroupService = game:GetService("GroupService")
local QueryAuthTypes = require(script.Parent.Parent.Types)
type AuthCondition = QueryAuthTypes.AuthCondition
--[=[
Checks if the player is in the specified group with an optional rank range.
@function Group
@within QueryAuth
@param group_id number -- The Roblox... | 352 |
PossiblePanda/QueryAuth | PossiblePanda-QueryAuth-d5bcf8a/lib/DefaultAuthConditions/Once.luau | luau | .luau | --[=[
Checks to see if the player has not met this condition before.
@function Once
@within QueryAuth
@return AuthCondition -- A lambda that returns true if the player did not get checked by the condition before.
]=]
return function()
local used = {}
return function(player: Player)
if used[player] ... | 95 |
PossiblePanda/QueryAuth | PossiblePanda-QueryAuth-d5bcf8a/lib/DefaultAuthConditions/Policy.luau | luau | .luau | local QueryAuthTypes = require(script.Parent.Parent.Types)
local PolicyService = game:GetService("PolicyService")
type AuthCondition = QueryAuthTypes.AuthCondition
type Policy = QueryAuthTypes.Policy
--[=[
Checks if PolicyService allows the specified policy for the player.
@function Policy
@within QueryAuth
@para... | 156 |
PossiblePanda/QueryAuth | PossiblePanda-QueryAuth-d5bcf8a/lib/DefaultAuthConditions/Premium.luau | luau | .luau | local QueryAuthTypes = require(script.Parent.Parent.Types)
type AuthCondition = QueryAuthTypes.AuthCondition
--[=[
Checks to see if the player has premium.
@function Premium
@within QueryAuth
@return AuthCondition -- A lambda that returns true if the player has premium.
]=]
return function(): AuthCondition
retur... | 94 |
PossiblePanda/QueryAuth | PossiblePanda-QueryAuth-d5bcf8a/lib/DefaultAuthConditions/ServerTime.luau | luau | .luau | local Workspace = game:GetService("Workspace")
local QueryAuthTypes = require(script.Parent.Parent.Types)
type AuthCondition = QueryAuthTypes.AuthCondition
--[=[
Checks to see if the server's time is greater or equal to the provided time.
@function ServerTime
@within QueryAuth
@param time number -- The time to ch... | 135 |
PossiblePanda/QueryAuth | PossiblePanda-QueryAuth-d5bcf8a/lib/DefaultAuthConditions/Studio.luau | luau | .luau | local RunService = game:GetService("RunService")
local QueryAuthTypes = require(script.Parent.Parent.Types)
type AuthCondition = QueryAuthTypes.AuthCondition
--[=[
Checks to see if the game is running in studio.
@function Studio
@within QueryAuth
@return AuthCondition -- A lambda that returns true if game is runn... | 102 |
PossiblePanda/QueryAuth | PossiblePanda-QueryAuth-d5bcf8a/lib/DefaultAuthConditions/Team.luau | luau | .luau | local QueryAuthTypes = require(script.Parent.Parent.Types)
type AuthCondition = QueryAuthTypes.AuthCondition
--[=[
Checks if a player's team name is in the provided list of team names.
@function Team
@within QueryAuth
@param values {string}? -- List of team names to check against. If nil, any team will pass.
@re... | 137 |
PossiblePanda/QueryAuth | PossiblePanda-QueryAuth-d5bcf8a/lib/DefaultAuthConditions/Throttle.luau | luau | .luau | --[=[
A player time-based rate limiter, only returning true if you call it less than `times` amount of times within the `timeFrame` amount of time for a given player.
@function Throttle
@within QueryAuth
@param timeFrame number -- The amount of time (seconds by default) between resetting the amount of calls that ca... | 370 |
PossiblePanda/QueryAuth | PossiblePanda-QueryAuth-d5bcf8a/lib/DefaultAuthConditions/UserId.luau | luau | .luau | local QueryAuthTypes = require(script.Parent.Parent.Types)
type AuthCondition = QueryAuthTypes.AuthCondition
--[=[
Checks if a player's UserId is in the provided list of UserIds.
@function UserId
@within QueryAuth
@param values {number}? -- List of UserIds to check against. If nil, no UserId will pass.
@return A... | 127 |
PossiblePanda/QueryAuth | PossiblePanda-QueryAuth-d5bcf8a/lib/Types.luau | luau | .luau | --[=[
@class Types
]=]
--[=[
@type AuthCondition (player: Player) -> boolean
@within Types
]=]
export type AuthCondition = (player: Player) -> boolean
--[=[
A string which represents policies returned by [PolicyService.GetPolicyInfoForPlayerAsync](https://create.roblox.com/docs/reference/engine/classes/PolicyServ... | 257 |
PossiblePanda/QueryAuth | PossiblePanda-QueryAuth-d5bcf8a/src/init.client.luau | luau | .luau | local ReplicatedStorage = game:GetService("ReplicatedStorage")
local RunService = game:GetService("RunService")
local QueryAuth = require(ReplicatedStorage.QueryAuth)
local plr = game.Players.LocalPlayer
local test = QueryAuth.any({
QueryAuth.UserId(plr.UserId),
})
if test(plr) == true then
print("🟢 Expected test... | 466 |
YetAnotherClown/YetAnotherNet | YetAnotherClown-YetAnotherNet-a8f8f7e/examples/matter/src/client/systems/roombasHurt.luau | luau | .luau | local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Matter = require(ReplicatedStorage.Packages.Matter)
local components = require(ReplicatedStorage.Shared.components)
local function roombasHurt(world)
for _, _, model in world:query(components.Roomba, compon... | 214 |
YetAnotherClown/YetAnotherNet | YetAnotherClown-YetAnotherNet-a8f8f7e/examples/matter/src/client/systems/spinSpinners.luau | luau | .luau | local ReplicatedStorage = game:GetService("ReplicatedStorage")
local components = require(ReplicatedStorage.Shared.components)
local function spinSpinners(world, _, ui)
if ui.checkbox("Disable Spinning"):checked() then
return
end
local transparency = ui.slider(1)
local randomize = ui.button("Randomize colors!"... | 171 |
YetAnotherClown/YetAnotherNet | YetAnotherClown-YetAnotherNet-a8f8f7e/examples/matter/src/game.client.luau | luau | .luau | local ReplicatedStorage = game:GetService("ReplicatedStorage")
local start = require(ReplicatedStorage.Shared.start)
local receiveReplication = require(ReplicatedStorage.Client.systems.receiveReplication)
local world, state = start({
ReplicatedStorage.Shared.systems,
ReplicatedStorage.Client.systems,
})
receiveRepl... | 75 |
YetAnotherClown/YetAnotherNet | YetAnotherClown-YetAnotherNet-a8f8f7e/examples/matter/src/server/systems/mothershipsSpawnRoombas.luau | luau | .luau | local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Matter = require(ReplicatedStorage.Packages.Matter)
local components = require(ReplicatedStorage.Shared.components)
local function mothershipsSpawnRoombas(world)
for id, model, lasering, transform in
world:query(components.Model, components.Laseri... | 271 |
YetAnotherClown/YetAnotherNet | YetAnotherClown-YetAnotherNet-a8f8f7e/examples/matter/src/server/systems/removeMissingModels.luau | luau | .luau | local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Matter = require(ReplicatedStorage.Packages.Matter)
local components = require(ReplicatedStorage.Shared.components)
local function removeMissingModels(world)
for id, model in world:query(components.Model) do
for _ in Matter.useEvent(model.model, "... | 190 |
YetAnotherClown/YetAnotherNet | YetAnotherClown-YetAnotherNet-a8f8f7e/examples/matter/src/server/systems/replication.luau | luau | .luau | local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local components = require(ReplicatedStorage.Shared.components)
local routes = require(ReplicatedStorage.Shared.routes)
local useEvent = require(ReplicatedStorage.Packages.Matter).useEvent
local REPLICATED_COMPONE... | 378 |
YetAnotherClown/YetAnotherNet | YetAnotherClown-YetAnotherNet-a8f8f7e/examples/matter/src/server/systems/roombasMove.luau | luau | .luau | local ReplicatedStorage = game:GetService("ReplicatedStorage")
local components = require(ReplicatedStorage.Shared.components)
local function roombasMove(world)
local targets = {}
for _, model in world:query(components.Model, components.Target) do
table.insert(targets, model.model.PrimaryPart.CFrame.p)
end
for ... | 467 |
YetAnotherClown/YetAnotherNet | YetAnotherClown-YetAnotherNet-a8f8f7e/examples/matter/src/server/systems/spawnRoombas.luau | luau | .luau | local ReplicatedStorage = game:GetService("ReplicatedStorage")
local components = require(ReplicatedStorage.Shared.components)
local function spawnRoombas(world)
for id, _ in world:query(components.Transform, components.Roomba):without(components.Model) do
local model = ReplicatedStorage.Assets.KillerRoomba:Clone()... | 119 |
YetAnotherClown/YetAnotherNet | YetAnotherClown-YetAnotherNet-a8f8f7e/examples/matter/src/shared/components.luau | luau | .luau | local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Matter = require(ReplicatedStorage.Packages.Matter)
local COMPONENTS = {
"Roomba",
"Model",
"Charge",
"Health",
"Target",
"Transform",
"Mothership",
"Lasering",
"DebugLabel",
"Spinner",
}
local components = {}
for _, name in ipairs(COMPON... | 107 |
YetAnotherClown/YetAnotherNet | YetAnotherClown-YetAnotherNet-a8f8f7e/examples/matter/src/shared/routes.luau | luau | .luau | local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Packages = ReplicatedStorage.Packages
type ComponentInstance<T> = T & { patch: (self: T, data: { any: any }) -> ComponentInstance<T> }
local Net = require(Packages.Net)
local Route = Net.Route
type Route<U...> = Net.Route<U...>
local defaultConfig... | 133 |
YetAnotherClown/YetAnotherNet | YetAnotherClown-YetAnotherNet-a8f8f7e/examples/matter/src/shared/start.luau | luau | .luau | local RunService = game:GetService("RunService")
local UserInputService = game:GetService("UserInputService")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Packages = ReplicatedStorage.Packages
local Matter = require(ReplicatedStorage.Packages.Matter)
local Plasma = require(Packages.Plasma)
local... | 594 |
YetAnotherClown/YetAnotherNet | YetAnotherClown-YetAnotherNet-a8f8f7e/examples/matter/src/shared/systems/updateModelAttribute.luau | luau | .luau | local RunService = game:GetService("RunService")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local components = require(ReplicatedStorage.Shared.components)
local name = RunService:IsServer() and "serverEntityId" or "clientEntityId"
local function updateModelAttribute(world)
for id, record in worl... | 102 |
YetAnotherClown/YetAnotherNet | YetAnotherClown-YetAnotherNet-a8f8f7e/lib/Connection.luau | luau | .luau | type ConnectionImpl = {
__index: ConnectionImpl,
_callback: <U...>(U...) -> (),
connected: boolean,
disconnect: (Connection) -> (),
reconnect: (Connection) -> (),
new: <U...>(callback: (U...) -> ()) -> Connection,
}
export type Connection = typeof(setmetatable({} :: ConnectionImpl, {} :: ConnectionImpl))
--[... | 296 |
YetAnotherClown/YetAnotherNet | YetAnotherClown-YetAnotherNet-a8f8f7e/lib/Identifier.luau | luau | .luau | local identifier = require("@serdes/datatypes/custom/identifier")
export type Identifier = buffer
local function new(uniquePosition: number?): buffer
return identifier.serialize(uniquePosition)
end
local function read(_buffer: buffer): number
return identifier.deserialize(_buffer)
end
return {
new = new,
read = ... | 66 |
YetAnotherClown/YetAnotherNet | YetAnotherClown-YetAnotherNet-a8f8f7e/lib/QueryResult.luau | luau | .luau | local Bridge = require("@yetanothernet/Bridge")
type Bridge = Bridge.Bridge
type Recipient = Bridge.Recipient
type IncomingPacket = Bridge.IncomingPacket
type OutgoingPacket = Bridge.OutgoingPacket
type IncomingQueue = Bridge.IncomingQueue
type OutgoingQueue = Bridge.OutgoingQueue
type NetServer = Bridge.NetServer
... | 1,472 |
YetAnotherClown/YetAnotherNet | YetAnotherClown-YetAnotherNet-a8f8f7e/lib/SendRequest.luau | luau | .luau | local RunService = game:GetService("RunService")
local Bridge = require("@yetanothernet/Bridge")
type Bridge = Bridge.Bridge
type Recipient = Bridge.Recipient
type IncomingPacket = Bridge.IncomingPacket
type OutgoingPacket = Bridge.OutgoingPacket
type IncomingQueue = Bridge.IncomingQueue
type OutgoingQueue = Bridge.... | 392 |
YetAnotherClown/YetAnotherNet | YetAnotherClown-YetAnotherNet-a8f8f7e/lib/__mocks__/mockBridge.luau | luau | .luau | --!nonstrict
local root = script.Parent.Parent
local Bridge = require(root.Bridge)
local utils = root.__utils__
local mockRemoteEvents = require(utils.mockRemoteEvents)
local mockPlayers = require(utils.mockPlayers)
local ServerRemoteEvent = mockRemoteEvents.ServerRemoteEvent
local ClientRemoteEvent = mockRemoteEvent... | 331 |
YetAnotherClown/YetAnotherNet | YetAnotherClown-YetAnotherNet-a8f8f7e/lib/__tests__/Bridge.test.luau | luau | .luau | local JestGlobals = require("@dev-packages/JestGlobals")
local Bridge = require("@yetanothernet/Bridge")
local beforeAll = JestGlobals.beforeAll
local describe = JestGlobals.describe
local expect = JestGlobals.expect
local test = JestGlobals.test
local jest = JestGlobals.jest
local root = script.Parent.Parent
local Br... | 1,381 |
YetAnotherClown/YetAnotherNet | YetAnotherClown-YetAnotherNet-a8f8f7e/lib/__tests__/Identifier.test.luau | luau | .luau | local JestGlobals = require("@dev-packages/JestGlobals")
local describe = JestGlobals.describe
local expect = JestGlobals.expect
local it = JestGlobals.it
local Identifier = require("@yetanothernet/Identifier")
describe("Identifier", function()
it("Should return unique strings", function()
local identifierOne = Id... | 147 |
YetAnotherClown/YetAnotherNet | YetAnotherClown-YetAnotherNet-a8f8f7e/lib/__tests__/Route.test.luau | luau | .luau | local Net = require("@yetanothernet")
local JestGlobals = require("@dev-packages/JestGlobals")
local beforeAll = JestGlobals.beforeAll
local afterEach = JestGlobals.afterEach
local beforeEach = JestGlobals.beforeEach
local describe = JestGlobals.describe
local expect = JestGlobals.expect
local test = JestGlobals.test
l... | 1,377 |
YetAnotherClown/YetAnotherNet | YetAnotherClown-YetAnotherNet-a8f8f7e/lib/__tests__/SendRequest.test.luau | luau | .luau | local JestGlobals = require("@dev-packages/JestGlobals")
local describe = JestGlobals.describe
local test = JestGlobals.test
local Identifier = require("@yetanothernet/Identifier")
local SendRequest = require("@yetanothernet/SendRequest")
describe("SendRequest", function()
test("When calling `to()`, should modify th... | 174 |
YetAnotherClown/YetAnotherNet | YetAnotherClown-YetAnotherNet-a8f8f7e/lib/__tests__/serdes.test.luau | luau | .luau | local Workspace = game:GetService("Workspace")
local JestGlobals = require("@dev-packages/JestGlobals")
local expect = JestGlobals.expect
local describe = JestGlobals.describe
local test = JestGlobals.test
local root = script.Parent.Parent
local typeToValue = {
array = { 1, 2, 3 },
dictionary = {
a = 1,
b = 2,... | 1,009 |
YetAnotherClown/YetAnotherNet | YetAnotherClown-YetAnotherNet-a8f8f7e/lib/__utils__/mockPlayers.luau | luau | .luau | local mockedPlayers = {}
function createPlayer()
local n = #mockedPlayers + 1
table.insert(mockedPlayers, {
__type = "Player",
Name = `MockPlayer{n}`,
UserId = -n,
})
return mockedPlayers[n]
end
function getAllPlayers()
return mockedPlayers
end
return {
createPlayer = createPlayer,
getAllPlayers = getA... | 85 |
YetAnotherClown/YetAnotherNet | YetAnotherClown-YetAnotherNet-a8f8f7e/lib/__utils__/mockRemoteEvents.luau | luau | .luau | --!nocheck
local Signal = require("@dev-packages/Signal")
local clientRemotes = {}
local serverRemotes = {}
local ClientRemoteEvent = {}
ClientRemoteEvent.__index = ClientRemoteEvent
local mockPlayers = require("@yetanothernet/__utils__/mockPlayers")
function ClientRemoteEvent:FireServer(...: any)
local container... | 656 |
YetAnotherClown/YetAnotherNet | YetAnotherClown-YetAnotherNet-a8f8f7e/lib/serdes/datatypes/custom/identifier.luau | luau | .luau | --!native
local BUFFER_SIZE = 2
local nextIdentifier = 1
local function serialize(position: number?): buffer
if not position then
position = nextIdentifier
nextIdentifier += 1
end
local _buffer = buffer.create(BUFFER_SIZE)
buffer.writeu16(_buffer, 0, position :: number)
return _buffer
end
local function ... | 128 |
YetAnotherClown/YetAnotherNet | YetAnotherClown-YetAnotherNet-a8f8f7e/lib/serdes/datatypes/primitive/boolean.luau | luau | .luau | --!native
local BUFFER_SIZE = 1
local _true = buffer.create(BUFFER_SIZE)
buffer.writei8(_true, 0, 1)
local _false = buffer.create(BUFFER_SIZE)
buffer.writei8(_false, 0, 0)
local _nil = buffer.create(BUFFER_SIZE)
buffer.writei8(_nil, 0, -1)
local function serialize(bool: boolean?): buffer
if bool == true then
re... | 188 |
YetAnotherClown/YetAnotherNet | YetAnotherClown-YetAnotherNet-a8f8f7e/lib/serdes/datatypes/primitive/buffer.luau | luau | .luau | --!native
--[[
This exists purely to add support for buffers into
Arrays, Dictionaries, and other custom types which may
contain a buffer.
Instead of defining unique behavior for buffers, this
module allows us to use the prexisting framework for
serializing/deserializing datatypes for buffers.... | 122 |
YetAnotherClown/YetAnotherNet | YetAnotherClown-YetAnotherNet-a8f8f7e/lib/serdes/datatypes/primitive/number.luau | luau | .luau | --!native
local BUFFER_SIZE = 4
local function serialize(number: number): buffer
local _buffer = buffer.create(BUFFER_SIZE)
buffer.writef32(_buffer, 0, number)
return _buffer
end
local function deserialize(_buffer: buffer): number
return buffer.readf32(_buffer, 0)
end
return {
serialize = serialize,
deseriali... | 94 |
YetAnotherClown/YetAnotherNet | YetAnotherClown-YetAnotherNet-a8f8f7e/lib/serdes/datatypes/primitive/string.luau | luau | .luau | --!native
local function serialize(_string: string): buffer
return buffer.fromstring(_string)
end
local function deserialize(_buffer: buffer): string
return buffer.tostring(_buffer)
end
return {
serialize = serialize,
deserialize = deserialize,
id = 5,
}
| 60 |
YetAnotherClown/YetAnotherNet | YetAnotherClown-YetAnotherNet-a8f8f7e/lib/serdes/datatypes/userdata/BrickColor.luau | luau | .luau | --!native
local BUFFER_SIZE = 2
local brickColorCache = {}
local function serialize(color: BrickColor): buffer
if brickColorCache[color.Number] then
return brickColorCache[color.Number]
end
local _buffer = buffer.create(BUFFER_SIZE)
buffer.writeu16(_buffer, 0, color.Number)
brickColorCache[color.Number] = _... | 143 |
YetAnotherClown/YetAnotherNet | YetAnotherClown-YetAnotherNet-a8f8f7e/lib/serdes/datatypes/userdata/CFrame.luau | luau | .luau | --!native
local BUFFER_SIZE = 48
local function serialize(cframe: CFrame): buffer
local _buffer = buffer.create(BUFFER_SIZE)
local x, y, z, R00, R01, R02, R10, R11, R12, R20, R21, R22 = cframe:GetComponents()
buffer.writef32(_buffer, 0, x)
buffer.writef32(_buffer, 4, y)
buffer.writef32(_buffer, 8, z)
buffer.wri... | 468 |
YetAnotherClown/YetAnotherNet | YetAnotherClown-YetAnotherNet-a8f8f7e/lib/serdes/datatypes/userdata/Color3.luau | luau | .luau | --!native
local BUFFER_SIZE = 12
local function serialize(color: Color3): buffer
local _buffer = buffer.create(BUFFER_SIZE)
buffer.writef32(_buffer, 0, color.R)
buffer.writef32(_buffer, 4, color.G)
buffer.writef32(_buffer, 8, color.B)
return _buffer
end
local function deserialize(_buffer: buffer): Color3
loca... | 161 |
YetAnotherClown/YetAnotherNet | YetAnotherClown-YetAnotherNet-a8f8f7e/lib/serdes/datatypes/userdata/DateTime.luau | luau | .luau | --!native
local BUFFER_SIZE = 8
local function serialize(dateTime: DateTime): buffer
local _buffer = buffer.create(BUFFER_SIZE)
buffer.writef64(_buffer, 0, dateTime.UnixTimestampMillis)
return _buffer
end
local function deserialize(_buffer: buffer): DateTime
return DateTime.fromUnixTimestampMillis(buffer.readf64... | 103 |
YetAnotherClown/YetAnotherNet | YetAnotherClown-YetAnotherNet-a8f8f7e/lib/serdes/datatypes/userdata/EnumItem.luau | luau | .luau | --!native
local enumMap = {}
for _, enum in Enum:GetEnums() do
enumMap[tostring(enum)] = {}
for _, enumItem in enum:GetEnumItems() do
enumMap[tostring(enum)][enumItem.Value] = enumItem
end
end
local enumItemCache = {}
local function serialize(enumItem: EnumItem): buffer
if enumItemCache[enumItem] then
retur... | 257 |
YetAnotherClown/YetAnotherNet | YetAnotherClown-YetAnotherNet-a8f8f7e/lib/serdes/datatypes/userdata/Instance.luau | luau | .luau | --!native
local BUFFER_SIZE = 4
local nextIdentifer = 1
local instanceMap: { [number]: Instance } = {}
local function setIdentifier(identifier: number, instance: Instance)
instanceMap[tonumber(identifier) :: number] = instance
end
local function getInstanceMap()
return table.freeze(table.clone(instanceMap))
end
... | 222 |
YetAnotherClown/YetAnotherNet | YetAnotherClown-YetAnotherNet-a8f8f7e/lib/serdes/datatypes/userdata/Rect.luau | luau | .luau | --!native
local vector2 = require("@serdes/datatypes/userdata/Vector2")
local BUFFER_SIZE = vector2.size * 2
local function serialize(rect: Rect): buffer
local min = vector2.serialize(rect.Min)
local max = vector2.serialize(rect.Max)
local _buffer = buffer.create(BUFFER_SIZE)
buffer.copy(_buffer, 0, min, 0, vec... | 226 |
YetAnotherClown/YetAnotherNet | YetAnotherClown-YetAnotherNet-a8f8f7e/lib/serdes/datatypes/userdata/Region3.luau | luau | .luau | --!native
local cframe = require("@serdes/datatypes/userdata/CFrame")
local vector3 = require("@serdes/datatypes/userdata/Vector3")
local BUFFER_SIZE = cframe.size + vector3.size
local function serialize(region: Region3): buffer
local _cframe = cframe.serialize(region.CFrame)
local size = vector3.serialize(region.... | 283 |
YetAnotherClown/YetAnotherNet | YetAnotherClown-YetAnotherNet-a8f8f7e/lib/serdes/datatypes/userdata/Region3int16.luau | luau | .luau | --!native
local vector3int16 = require("@serdes/datatypes/userdata/Vector3int16")
local BUFFER_SIZE = vector3int16.size * 2
local function serialize(region: Region3int16): buffer
local min = vector3int16.serialize(region.Min)
local max = vector3int16.serialize(region.Max)
local _buffer = buffer.create(BUFFER_SIZ... | 262 |
YetAnotherClown/YetAnotherNet | YetAnotherClown-YetAnotherNet-a8f8f7e/lib/serdes/datatypes/userdata/TweenInfo.luau | luau | .luau | --!native
local enumItem = require("@serdes/datatypes/userdata/EnumItem")
local number = require("@serdes/datatypes/primitive/number")
local boolean = require("@serdes/datatypes/primitive/boolean")
local _string = require("@serdes/datatypes/primitive/string")
local PARTIAL_BUFFER_SIZE = (number.size * 3) + boolean.si... | 866 |
YetAnotherClown/YetAnotherNet | YetAnotherClown-YetAnotherNet-a8f8f7e/lib/serdes/datatypes/userdata/UDim.luau | luau | .luau | --!native
local BUFFER_SIZE = 8
local function serialize(udim: UDim): buffer
local _buffer = buffer.create(BUFFER_SIZE)
buffer.writef32(_buffer, 0, udim.Scale)
buffer.writeu32(_buffer, 4, udim.Offset)
return _buffer
end
local function deserialize(_buffer: buffer): UDim
local scale = buffer.readf32(_buffer, 0)
... | 137 |
YetAnotherClown/YetAnotherNet | YetAnotherClown-YetAnotherNet-a8f8f7e/lib/serdes/datatypes/userdata/UDim2.luau | luau | .luau | --!native
local udim = require("@serdes/datatypes/userdata/UDim")
local BUFFER_SIZE = udim.size * 2
local function serialize(_udim: UDim2): buffer
local x = udim.serialize(_udim.X)
local y = udim.serialize(_udim.Y)
local _buffer = buffer.create(BUFFER_SIZE)
buffer.copy(_buffer, 0, x)
buffer.copy(_buffer, udim.... | 221 |
YetAnotherClown/YetAnotherNet | YetAnotherClown-YetAnotherNet-a8f8f7e/lib/serdes/datatypes/userdata/Vector2.luau | luau | .luau | --!native
local BUFFER_SIZE = 8
local function serialize(vector: Vector2): buffer
local _buffer = buffer.create(BUFFER_SIZE)
buffer.writef32(_buffer, 0, vector.X)
buffer.writef32(_buffer, 4, vector.Y)
return _buffer
end
local function deserialize(_buffer: buffer): Vector2
local x = buffer.readf32(_buffer, 0)
... | 133 |
YetAnotherClown/YetAnotherNet | YetAnotherClown-YetAnotherNet-a8f8f7e/lib/serdes/datatypes/userdata/Vector2int16.luau | luau | .luau | --!native
local BUFFER_SIZE = 4
local function serialize(vector: Vector2int16): buffer
local _buffer = buffer.create(BUFFER_SIZE)
buffer.writei16(_buffer, 0, vector.X)
buffer.writei16(_buffer, 2, vector.Y)
return _buffer
end
local function deserialize(_buffer: buffer): Vector2int16
local x = buffer.readi16(_bu... | 139 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.