repo stringclasses 254
values | file_path stringlengths 29 241 | code stringlengths 100 233k | tokens int64 14 69.4k |
|---|---|---|---|
TheNexusAvenger/Nexus-VR-Character-Model | TheNexusAvenger-Nexus-VR-Character-Model-c6e3ad0/src/UI/View/ApiBaseView.luau | --Base view for the menu intended to be used with the API.
--!strict
local GuiService = game:GetService("GuiService")
local NexusVRCharacterModel = script.Parent.Parent.Parent
local NexusInstance = require(NexusVRCharacterModel:WaitForChild("Packages"):WaitForChild("NexusInstance"))
local ApiBaseView = {}
ApiBaseVie... | 565 |
TheNexusAvenger/Nexus-VR-Character-Model | TheNexusAvenger-Nexus-VR-Character-Model-c6e3ad0/src/UI/View/EnigmaView.luau | --View for the Enigma library.
--!strict
local SUPPORTED_PROTOCOL_VERSIONS = {
["1"] = true,
["2"] = true,
}
local Workspace = game:GetService("Workspace")
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local UserInputService = game:GetService("UserInputService")
l... | 3,183 |
TheNexusAvenger/Nexus-VR-Character-Model | TheNexusAvenger-Nexus-VR-Character-Model-c6e3ad0/src/UI/View/SettingsView.luau | --View for the user settings.
--!strict
local UserInputService = game:GetService("UserInputService")
local VRService = game:GetService("VRService")
local NexusVRCharacterModel = script.Parent.Parent.Parent
local NexusButton = require(NexusVRCharacterModel:WaitForChild("Packages"):WaitForChild("NexusButton"))
local Ca... | 2,646 |
TheNexusAvenger/Nexus-VR-Character-Model | TheNexusAvenger-Nexus-VR-Character-Model-c6e3ad0/src/Util/BufferProtocol.luau | --Serializes and deserializes buffers for Nexus Buffered Replication.
--!strict
local BUFFER_PROTOCOL_FIELDS = {
--Normal.
{
Name = "UpdateTime",
Type = "number",
},
{
Name = "CurrentWalkspeed",
Type = "number",
},
{
Name = "HeadCFrame",
Type = "C... | 1,142 |
TheNexusAvenger/Nexus-VR-Character-Model | TheNexusAvenger-Nexus-VR-Character-Model-c6e3ad0/src/Util/FindCollidablePartOnRay.luau | --Helper function that ray casts to find a collidable part.
--!strict
local Workspace = game:GetService("Workspace")
return function(StartPosition: Vector3, Direction: Vector3, IgnoreList: Instance | {Instance}?, CollisionGroup: string?): (BasePart?, Vector3)
--Convert the collision group.
if typeof(Collision... | 347 |
TheNexusAvenger/Nexus-VR-Character-Model | TheNexusAvenger-Nexus-VR-Character-Model-c6e3ad0/src/Util/Warnings.luau | --Displays warnings when loading Nexus VR Character Model.
--!strict
local HttpService = game:GetService("HttpService")
return function(): ()
--Load the configuration.
local ConfigurationValue = script.Parent.Parent:WaitForChild("Configuration")
local Configuration = HttpService:JSONDecode(Configuration... | 414 |
TheNexusAvenger/Nexus-VR-Character-Model | TheNexusAvenger-Nexus-VR-Character-Model-c6e3ad0/src/init.luau | --Loads Nexus VR Character Model.
--!strict
--Version information should be set right before distribution (not committed).
local VERSION_TAG = "dev"
local VERSION_COMMIT = "00000000"
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local HttpService = game:GetService("HttpService")
local NexusBufferedR... | 1,106 |
lisphm/A-Chassis | lisphm-A-Chassis-121b403/Scripts/CustomEngine.luau | --[[
_____ _ _
/\ / ____| | (_)
/ \ ______| | | |__ __ _ ___ ___ _ ___
/ /\ \______| | | '_ \ / _` / __/ __| / __|
/ ____ \ | |____| | | | (_| \__ \__ \ \__ \
/_/ \_\ \_____|_| |_|\__,_|___/___/_|___/
Version 1... | 807 |
lisphm/A-Chassis | lisphm-A-Chassis-121b403/Scripts/MiscWeld.luau | --[[
___ _____
/ _ |/ ___/ Avxnturador | Novena midmm5 |
/ __ / /__ LuaInt | Novena
/_/ |_\___/ Detomiks | Base Chassis
Version 1.7
*Credit ... | 676 |
lisphm/A-Chassis | lisphm-A-Chassis-121b403/Scripts/Plugins/Aerodynamics.luau | --[[
_____ _ _
/\ / ____| | (_)
/ \ ______| | | |__ __ _ ___ ___ _ ___
/ /\ \______| | | '_ \ / _` / __/ __| / __|
/ ____ \ | |____| | | | (_| \__ \__ \ \__ \
/_/ \_\ \_____|_| |_|\__,_|___/___/_|___/
Version 1... | 1,848 |
lisphm/A-Chassis | lisphm-A-Chassis-121b403/Scripts/Plugins/Controls.luau | --[[
_____ _ _
/\ / ____| | (_)
/ \ ______| | | |__ __ _ ___ ___ _ ___
/ /\ \______| | | '_ \ / _` / __/ __| / __|
/ ____ \ | |____| | | | (_| \__ \__ \ \__ \
/_/ \_\ \_____|_| |_|\__,_|___/___/_|___/
Version 1... | 2,109 |
lisphm/A-Chassis | lisphm-A-Chassis-121b403/Scripts/Plugins/GForces.luau | --[[
_____ _ _
/\ / ____| | (_)
/ \ ______| | | |__ __ _ ___ ___ _ ___
/ /\ \______| | | '_ \ / _` / __/ __| / __|
/ ____ \ | |____| | | | (_| \__ \__ \ \__ \
/_/ \_\ \_____|_| |_|\__,_|___/___/_|___/
Version 1... | 1,093 |
lisphm/A-Chassis | lisphm-A-Chassis-121b403/Scripts/Plugins/Gauges.luau | --[[
_____ _ _
/\ / ____| | (_)
/ \ ______| | | |__ __ _ ___ ___ _ ___
/ /\ \______| | | '_ \ / _` / __/ __| / __|
/ ____ \ | |____| | | | (_| \__ \__ \ \__ \
/_/ \_\ \_____|_| |_|\__,_|___/___/_|___/
Version 1... | 5,432 |
lisphm/A-Chassis | lisphm-A-Chassis-121b403/Scripts/Plugins/Ignition.luau | --[[
_____ _ _
/\ / ____| | (_)
/ \ ______| | | |__ __ _ ___ ___ _ ___
/ /\ \______| | | '_ \ / _` / __/ __| / __|
/ ____ \ | |____| | | | (_| \__ \__ \ \__ \
/_/ \_\ \_____|_| |_|\__,_|___/___/_|___/
Version 1... | 423 |
lisphm/A-Chassis | lisphm-A-Chassis-121b403/Scripts/Plugins/MSteer Camera.luau | --[[
_____ _ _
/\ / ____| | (_)
/ \ ______| | | |__ __ _ ___ ___ _ ___
/ /\ \______| | | '_ \ / _` / __/ __| / __|
/ ____ \ | |____| | | | (_| \__ \__ \ \__ \
/_/ \_\ \_____|_| |_|\__,_|___/___/_|___/
Version 1... | 643 |
lisphm/A-Chassis | lisphm-A-Chassis-121b403/Scripts/Plugins/Sounds/README.luau | --[[
_____ _ _
/\ / ____| | (_)
/ \ ______| | | |__ __ _ ___ ___ _ ___
/ /\ \______| | | '_ \ / _` / __/ __| / __|
/ ____ \ | |____| | | | (_| \__ \__ \ \__ \
/_/ \_\ \_____|_| |_|\__,_|___/___/_|___/
Version 1... | 371 |
lisphm/A-Chassis | lisphm-A-Chassis-121b403/Scripts/Plugins/Sounds/Server.luau | --[[
_____ _ _
/\ / ____| | (_)
/ \ ______| | | |__ __ _ ___ ___ _ ___
/ /\ \______| | | '_ \ / _` / __/ __| / __|
/ ____ \ | |____| | | | (_| \__ \__ \ \__ \
/_/ \_\ \_____|_| |_|\__,_|___/___/_|___/
Version 1... | 2,901 |
lisphm/A-Chassis | lisphm-A-Chassis-121b403/Scripts/Plugins/Sounds/Sounds.luau | --[[
_____ _ _
/\ / ____| | (_)
/ \ ______| | | |__ __ _ ___ ___ _ ___
/ /\ \______| | | '_ \ / _` / __/ __| / __|
/ ____ \ | |____| | | | (_| \__ \__ \ \__ \
/_/ \_\ \_____|_| |_|\__,_|___/___/_|___/
Version 1... | 3,486 |
lisphm/A-Chassis | lisphm-A-Chassis-121b403/Scripts/Plugins/Tires/Simulated.luau | --[[
_____ _ _
/\ / ____| | (_)
/ \ ______| | | |__ __ _ ___ ___ _ ___
/ /\ \______| | | '_ \ / _` / __/ __| / __|
/ ____ \ | |____| | | | (_| \__ \__ \ \__ \
/_/ \_\ \_____|_| |_|\__,_|___/___/_|___/
Version 1... | 5,786 |
lisphm/A-Chassis | lisphm-A-Chassis-121b403/Scripts/Plugins/Tires/Tune.luau | --[[
_____ _ _
/\ / ____| | (_)
/ \ ______| | | |__ __ _ ___ ___ _ ___
/ /\ \______| | | '_ \ / _` / __/ __| / __|
/ ____ \ | |____| | | | (_| \__ \__ \ \__ \
/_/ \_\ \_____|_| |_|\__,_|___/___/_|___/
Version 1... | 1,138 |
lisphm/A-Chassis | lisphm-A-Chassis-121b403/Scripts/Units.luau | --[[
_____ _ _
/\ / ____| | (_)
/ \ ______| | | |__ __ _ ___ ___ _ ___
/ /\ \______| | | '_ \ / _` / __/ __| / __|
/ ____ \ | |____| | | | (_| \__ \__ \ \__ \
/_/ \_\ \_____|_| |_|\__,_|___/___/_|___/
Version 1... | 511 |
real2nix/mineblox | real2nix-mineblox-ec774db/src/ReplicatedStorage/Shared/ChunkSettings.luau | return {
CHUNK_SIZE = 8,
CHUNK_DISTANCE = 10,
MAX_CHUNK_DISTANCE = 1000,
MAX_CHUNK_LOADING_ACTORS = 24,
BLOCK_SIZE = 3,
}
| 46 |
real2nix/mineblox | real2nix-mineblox-ec774db/src/ReplicatedStorage/Shared/ChunksUtil.luau | local ChunksUtil = {}
local ReplicatedStorage = game:GetService('ReplicatedStorage')
local ChunkSettings = require(ReplicatedStorage.Shared.ChunkSettings)
local CHUNK_SIZE: number = ChunkSettings['CHUNK_SIZE']
local BLOCK_SIZE: number = ChunkSettings['BLOCK_SIZE']
-- PUBLIC
-- Converts [chunk_x][chunk_z][x][z][y] ... | 983 |
real2nix/mineblox | real2nix-mineblox-ec774db/src/ReplicatedStorage/Shared/ItemsData.luau | local itemsData = {
Air = {
isTransparent = true,
},
Water = {
isTransparent = true,
},
Stone = {
Hardness = 20,
PreferredTool = 'Pickaxe',
DropItem = 'Cobblestone',
Type = 'Block',
},
Cobblestone = {
Hardness = 20,
PreferredTool = 'Pickaxe',
Type = 'Block',
},
['Grass Block'] = {
Hardn... | 1,058 |
real2nix/mineblox | real2nix-mineblox-ec774db/src/ReplicatedStorage/Shared/ItemsIDs.luau | return {
'Air',
'Water',
-- Everyday blocks
'Dirt',
'Grass Block',
'Stone',
'Cobblestone',
'Oak Wood Planks',
'Oak Leaves',
'Oak Log',
'Bedrock',
'Sand',
'Glass',
-- Ore blocks
'Coal Ore',
'Gold Ore',
'Iron Ore',
'Diamond Ore',
-- Tools
'Wooden Pickaxe',
'Wooden Axe',
'Wooden Shovel',
'W... | 262 |
real2nix/mineblox | real2nix-mineblox-ec774db/src/StarterPlayer/ParallelScripts/BiomeLoaderParallel.client.luau | --!native
local actor: Actor = script:GetActor()
local ReplicatedStorage = game:GetService('ReplicatedStorage')
local StarterPlayer = game:GetService('StarterPlayer')
local ChunkSettings = require(ReplicatedStorage.Shared.ChunkSettings)
local BiomeSelector = require(StarterPlayer.StarterPlayerScripts.Modules.Chunks.L... | 259 |
real2nix/mineblox | real2nix-mineblox-ec774db/src/StarterPlayer/ParallelScripts/TerrainLoaderParallel.client.luau | --!native
local actor: Actor = script:GetActor()
local ReplicatedStorage = game:GetService('ReplicatedStorage')
local StarterPlayer = game:GetService('StarterPlayer')
local ChunkSettings = require(ReplicatedStorage.Shared.ChunkSettings)
local ItemsData = require(ReplicatedStorage.Shared.ItemsData)
local TerrainShapeG... | 320 |
real2nix/mineblox | real2nix-mineblox-ec774db/src/StarterPlayer/StarterPlayerScripts/Main.client.luau | local Players = game:GetService('Players')
local Modules = Players.LocalPlayer.PlayerScripts:WaitForChild('Modules')
require(Modules.Chunks.ChunksManager)
--require(Modules.Lighting)
task.delay(.1, function()
require(Modules.Break)
require(Modules.CollisionsManager)
end) | 63 |
real2nix/mineblox | real2nix-mineblox-ec774db/src/StarterPlayer/StarterPlayerScripts/Modules/Break.luau | local Break = {}
local Players = game:GetService('Players')
local ReplicatedStorage = game:GetService('ReplicatedStorage')
local UserInputService = game:GetService('UserInputService')
local Player: Player = Players.LocalPlayer
local PlayerScripts = Player.PlayerScripts
local Modules = PlayerScripts:WaitForChild('Mod... | 853 |
real2nix/mineblox | real2nix-mineblox-ec774db/src/StarterPlayer/StarterPlayerScripts/Modules/Chunks/ChunksManager.luau | --!native
local ChunkLoading = {}
local Players = game:GetService('Players')
local ReplicatedStorage = game:GetService('ReplicatedStorage')
local RunService = game:GetService('RunService')
local Player: Player = Players.LocalPlayer
local Character: Model = Player.Character or Player.CharacterAdded:Wait()
local Humano... | 4,901 |
real2nix/mineblox | real2nix-mineblox-ec774db/src/StarterPlayer/StarterPlayerScripts/Modules/Chunks/Data/ChunkGenerationStages.luau | -- Represents what stage has been completed by a chunk
return {
['none'] = 0,
['terrain'] = 1,
['biome'] = 2,
['done'] = 3
} | 47 |
real2nix/mineblox | real2nix-mineblox-ec774db/src/StarterPlayer/StarterPlayerScripts/Modules/Chunks/Loading/Terrain/BedrockGenerator.luau | --!native
local BedrockGeneration = {}
local ReplicatedStorage = game:GetService('ReplicatedStorage')
local ChunkSettings = require(ReplicatedStorage.Shared.ChunkSettings)
local ItemsData = require(ReplicatedStorage.Shared.ItemsData)
local CHUNK_SIZE: number = ChunkSettings['CHUNK_SIZE']
local MAX_CHUNK_DISTANCE: nu... | 233 |
real2nix/mineblox | real2nix-mineblox-ec774db/src/StarterPlayer/StarterPlayerScripts/Modules/Chunks/Loading/Terrain/Biomes/BiomeSelector.luau | local BiomeSelector = {}
local ReplicatedStorage = game:GetService('ReplicatedStorage')
local StarterPlayer = game:GetService('StarterPlayer')
local SplineMaps = require(StarterPlayer.StarterPlayerScripts.Modules.Chunks.Loading.Terrain.SplineMaps)
local BiomesData = require(StarterPlayer.StarterPlayerScripts.Modules.... | 496 |
real2nix/mineblox | real2nix-mineblox-ec774db/src/StarterPlayer/StarterPlayerScripts/Modules/Chunks/Loading/Terrain/Biomes/BiomesData.luau | local Players = game:GetService('Players')
local Player: Player = Players.LocalPlayer
local PlayerScripts = Player.PlayerScripts
local Modules = PlayerScripts:WaitForChild('Modules')
local ForestGenerator = require(Modules.Chunks.Loading.Terrain.Biomes.Forest.ForestGenerator)
local DesertGenerator = require(Modules.... | 347 |
real2nix/mineblox | real2nix-mineblox-ec774db/src/StarterPlayer/StarterPlayerScripts/Modules/Chunks/Loading/Terrain/Biomes/Desert/DesertGenerator.luau | local DesertGenerator = {}
function DesertGenerator.generate(chunkBlocks: buffer)
end
return DesertGenerator | 20 |
real2nix/mineblox | real2nix-mineblox-ec774db/src/StarterPlayer/StarterPlayerScripts/Modules/Chunks/Loading/Terrain/Biomes/Forest/Decorations/DecorationsGenerator.luau | local DecorationsGenerator = {}
local StarterPlayer = game:GetService("StarterPlayer")
local TreesGenerator = require(StarterPlayer.StarterPlayerScripts.Modules.Chunks.Loading.Terrain.Decorations.Trees.TreesGenerator)
--local DandelionGenerator = require(StarterPlayer.StarterPlayerScripts.Modules.Chunks.Loading.Terra... | 363 |
real2nix/mineblox | real2nix-mineblox-ec774db/src/StarterPlayer/StarterPlayerScripts/Modules/Chunks/Loading/Terrain/Biomes/Forest/Decorations/Trees/Tree.luau | local Tree = {}
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local ItemsData = require(ReplicatedStorage.Shared.ItemsData)
local OAK_LOG_ID = ItemsData['Oak Log']['ID']
local OAK_LEAVES_ID = ItemsData['Oak Leaves']['ID']
local MIN_LOGS = 3
local MAX_LOGS = 5
local LOGS_INSIDE_TREE = 2
-- PRIVATE... | 639 |
real2nix/mineblox | real2nix-mineblox-ec774db/src/StarterPlayer/StarterPlayerScripts/Modules/Chunks/Loading/Terrain/Biomes/Forest/Decorations/Trees/TreesGenerator.luau | local TreeGeneration = {}
local ReplicatedStorage = game:GetService('ReplicatedStorage')
local StarterPlayer = game:GetService("StarterPlayer")
local Modules = StarterPlayer.StarterPlayerScripts.Modules
local ChunkSettings = require(ReplicatedStorage.Shared.ChunkSettings)
local ChunksUtil = require(ReplicatedStorage... | 785 |
real2nix/mineblox | real2nix-mineblox-ec774db/src/StarterPlayer/StarterPlayerScripts/Modules/Chunks/Loading/Terrain/Biomes/Forest/Decorations/Unused/DandelionGenerator.luau | local DandelionGeneration = {}
local ReplicatedStorage = game:GetService('ReplicatedStorage')
local ChunkSettings = require(ReplicatedStorage.Shared.ChunkSettings)
local ChunksUtil = require(ReplicatedStorage.Shared.ChunksUtil)
local ItemsData = require(ReplicatedStorage.Shared.ItemsData)
local CHUNK_SIZE = ChunkSet... | 332 |
real2nix/mineblox | real2nix-mineblox-ec774db/src/StarterPlayer/StarterPlayerScripts/Modules/Chunks/Loading/Terrain/Biomes/Forest/Decorations/Unused/GrassGenerator.luau | local GrassGeneration = {}
local ReplicatedStorage = game:GetService('ReplicatedStorage')
local ChunkSettings = require(ReplicatedStorage.Shared.ChunkSettings)
local ChunksUtil = require(ReplicatedStorage.Shared.ChunksUtil)
local ItemsData = require(ReplicatedStorage.Shared.ItemsData)
local CHUNK_SIZE = ChunkSetting... | 313 |
real2nix/mineblox | real2nix-mineblox-ec774db/src/StarterPlayer/StarterPlayerScripts/Modules/Chunks/Loading/Terrain/Biomes/Forest/Decorations/Unused/OxeyeDaisyGenerator.luau | local OxeyeGeneration = {}
local ReplicatedStorage = game:GetService('ReplicatedStorage')
local ChunkSettings = require(ReplicatedStorage.Shared.ChunkSettings)
local ChunksUtil = require(ReplicatedStorage.Shared.ChunksUtil)
local ItemsData = require(ReplicatedStorage.Shared.ItemsData)
local CHUNK_SIZE = ChunkSetting... | 338 |
real2nix/mineblox | real2nix-mineblox-ec774db/src/StarterPlayer/StarterPlayerScripts/Modules/Chunks/Loading/Terrain/Biomes/Forest/Decorations/Unused/PoppyGenerator.luau | local PoppyGeneration = {}
local ReplicatedStorage = game:GetService('ReplicatedStorage')
local ChunkSettings = require(ReplicatedStorage.Shared.ChunkSettings)
local ChunksUtil = require(ReplicatedStorage.Shared.ChunksUtil)
local ItemsData = require(ReplicatedStorage.Shared.ItemsData)
local CHUNK_SIZE = ChunkSetting... | 325 |
real2nix/mineblox | real2nix-mineblox-ec774db/src/StarterPlayer/StarterPlayerScripts/Modules/Chunks/Loading/Terrain/Biomes/Forest/ForestGenerator.luau | local ForestGenerator = {}
local Players = game:GetService('Players')
local ReplicatedStorage = game:GetService('ReplicatedStorage')
local Player: Player = Players.LocalPlayer
local PlayerScripts = Player.PlayerScripts
local Modules = PlayerScripts:WaitForChild('Modules')
local ChunksUtil = require(ReplicatedStorag... | 540 |
real2nix/mineblox | real2nix-mineblox-ec774db/src/StarterPlayer/StarterPlayerScripts/Modules/Chunks/Loading/Terrain/Biomes/Forest/GrassLayerGenerator.luau | local GrassLayerGenerator = {}
local ReplicatedStorage = game:GetService('ReplicatedStorage')
local ChunksUtil = require(ReplicatedStorage.Shared.ChunksUtil)
local ChunkSettings = require(ReplicatedStorage.Shared.ChunkSettings)
local ItemsData = require(ReplicatedStorage.Shared.ItemsData)
local CHUNK_SIZE: number = ... | 687 |
real2nix/mineblox | real2nix-mineblox-ec774db/src/StarterPlayer/StarterPlayerScripts/Modules/Chunks/Loading/Terrain/Biomes/Jungle/JungleGenerator.luau | local JungleGenerator = {}
function JungleGenerator.generate(chunkBlocks: buffer)
end
return JungleGenerator | 20 |
real2nix/mineblox | real2nix-mineblox-ec774db/src/StarterPlayer/StarterPlayerScripts/Modules/Chunks/Loading/Terrain/Biomes/Tundra/TundraGenerator.luau | local TundraGenerator = {}
function TundraGenerator.generate(chunkBlocks: buffer)
end
return TundraGenerator | 23 |
real2nix/mineblox | real2nix-mineblox-ec774db/src/StarterPlayer/StarterPlayerScripts/Modules/Chunks/Loading/Terrain/TerrainShapeGenerator.luau | --!native
local TerrainShapeGenerator = {}
local ReplicatedStorage = game:GetService('ReplicatedStorage')
local Players = game:GetService('Players')
local Player: Player = Players.LocalPlayer
local PlayerScripts = Player.PlayerScripts
local Modules = PlayerScripts:WaitForChild('Modules')
local SplineMaps = require(... | 751 |
real2nix/mineblox | real2nix-mineblox-ec774db/src/StarterPlayer/StarterPlayerScripts/Modules/Chunks/Rendering/ChunkRenderer.luau | local ChunkRenderer = {}
-- 3333 max blocks, if face culling implemented
-- = 8 * 8 * 52 = 3328 blocks
--local buffer = buffer.create(12288)
local AssetService = game:GetService("AssetService")
local Atlas = AssetService:CreateEditableImageAsync("rbxassetid://17400483416")
local ReplicatedStorage = game:GetService('R... | 1,647 |
real2nix/mineblox | real2nix-mineblox-ec774db/src/StarterPlayer/StarterPlayerScripts/Modules/Chunks/Rendering/Data/AtlasTextureData.luau | return {
[1] = {},
[2] = {},
[3] = {2, 2, 2, 2, 2, 2},
[4] = {3, 3, 3, 3, 1, 2},
[5] = {9, 9, 9, 9, 9, 9},
[6] = {17, 17, 17, 17, 17, 17},
[7] = {4, 4, 4, 4, 5, 5},
[8] = {54, 54, 54, 54, 54, 54},
[9] = {21, 21, 21, 21, 22, 22},
} | 176 |
real2nix/mineblox | real2nix-mineblox-ec774db/src/StarterPlayer/StarterPlayerScripts/Modules/Chunks/Rendering/Data/BlockMeshData.luau | local BlockMeshData = {}
BlockMeshData.rightVertices = {
Vector3.new(.5, .5, .5),
Vector3.new(.5, .5, -.5),
Vector3.new(.5, -.5, .5),
Vector3.new(.5, -.5, -.5)
}
BlockMeshData.rightIndices = {3, 4, 2, 2, 1, 3}
BlockMeshData.leftVertices = {
Vector3.new(-.5, .5, -.5),
Vector3.new(-.5, .5, .5),
Vector3.new(-.5, ... | 502 |
real2nix/mineblox | real2nix-mineblox-ec774db/src/StarterPlayer/StarterPlayerScripts/Modules/Chunks/Rendering/Data/PlantMeshData.luau | local PlantMeshData = {}
PlantMeshData.leftVertices = {
Vector3.new(-.5, .5, -.5),
Vector3.new(.5, .5, .5),
Vector3.new(-.5, -.5, -.5),
Vector3.new(.5, -.5, .5),
}
PlantMeshData.leftIndices = {3, 4, 2, 2, 1, 3}
PlantMeshData.rightVertices = {
Vector3.new(-.5, .5, .5),
Vector3.new(.5, .5, -.5),
Vector3.new(-.5,... | 174 |
real2nix/mineblox | real2nix-mineblox-ec774db/src/StarterPlayer/StarterPlayerScripts/Modules/CollisionsManager.luau | local CollisionsManager = {}
local Players = game:GetService('Players')
local ReplicatedStorage = game:GetService('ReplicatedStorage')
local RunService = game:GetService('RunService')
local Player: Player = Players.LocalPlayer
local Character: Model = Player.Character or Player.CharacterAdded:Wait()
local HumanoidRoo... | 984 |
real2nix/mineblox | real2nix-mineblox-ec774db/src/StarterPlayer/StarterPlayerScripts/Modules/Lighting.luau | local LightingController = {}
local Lighting = game:GetService('Lighting')
local ReplicatedStorage = game:GetService('ReplicatedStorage')
local ChunkSettings = require(ReplicatedStorage.Shared.ChunkSettings)
local CHUNK_DISTANCE: number = ChunkSettings['CHUNK_DISTANCE']
local CHUNK_SIZE: number = ChunkSettings['CHUN... | 120 |
ffrostfall/BridgeNet2 | ffrostfall-BridgeNet2-d7fd18a/.vscode/vectorTypes.d.luau | export type vector = Vector3
declare vector: {
create: (x: number, y: number, z: number) -> vector,
magnitude: (vec: vector | Vector3) -> number,
normalize: (vec: vector | Vector3) -> vector,
cross: (vec1: vector | Vector3, vec2: vector | Vector3) -> vector,
dot: (vec1: vector | Vector3, vec2: vector | Vector3) -... | 245 |
ffrostfall/BridgeNet2 | ffrostfall-BridgeNet2-d7fd18a/external/data/styles.luau | local colorful = require("@vendor/lunePackages/colorful")
local style = colorful.combineStyles
local colors = colorful.color
local modifiers = colorful.modifier
return {
header = style({ colors.blue, modifiers.bold }),
detail = style({ colors.white, modifiers.dim }),
success = style({ colors.green, modifiers.bold... | 87 |
ffrostfall/BridgeNet2 | ffrostfall-BridgeNet2-d7fd18a/external/installWallyDependencies.luau | local async = require("@vendor/lunePackages/async")
local process = require("@lune/process")
local spawnProcess = require("@vendor/lunePackages/spawnProcess")
local spawnSourcemap = require("@ext/spawnSourcemap")
local styles = require("./data/styles")
return function()
print(styles.header("Installing Wally dependenc... | 161 |
ffrostfall/BridgeNet2 | ffrostfall-BridgeNet2-d7fd18a/external/makeDirectories.luau | local fs = require("@lune/fs")
local function reconcileDirectory(path: string)
if not fs.isDir(path) then
fs.writeDir(path)
end
end
return function()
reconcileDirectory("build/")
reconcileDirectory("build/package/")
reconcileDirectory("build/tests/")
end
| 64 |
ffrostfall/BridgeNet2 | ffrostfall-BridgeNet2-d7fd18a/external/spawnDarklua.luau | local spawnProcess = require("@vendor/lunePackages/spawnProcess")
return function()
spawnProcess("darklua", {
"process",
"src/",
"build/package/",
"--watch",
})
spawnProcess("darklua", {
"process",
"tests/roblox/",
"build/tests/",
"--watch",
})
end
| 84 |
ffrostfall/BridgeNet2 | ffrostfall-BridgeNet2-d7fd18a/external/spawnSourcemap.luau | local spawnProcess = require("@vendor/lunePackages/spawnProcess")
return function(watch: boolean?): thread
local parameters = {
"sourcemap",
"test-source.project.json",
"--output",
"sourcemap.json",
}
if watch then table.insert(parameters, "--watch") end
return spawnProcess("rojo", parameters)
end
| 80 |
ffrostfall/BridgeNet2 | ffrostfall-BridgeNet2-d7fd18a/lune/dev.luau | local async = require("@vendor/lunePackages/async")
local colorful = require("@vendor/lunePackages/colorful")
local spawnDarklua = require("@ext/spawnDarklua")
local spawnProcess = require("@vendor/lunePackages/spawnProcess")
local spawnSourcemap = require("@ext/spawnSourcemap")
local task = require("@lune/task")
local... | 280 |
ffrostfall/BridgeNet2 | ffrostfall-BridgeNet2-d7fd18a/lune/installDependencies.luau | local installGitDependencies = require("@ext/installGitDependencies")
local installWallyDependencies = require("@ext/installWallyDependencies")
local process = require("@lune/process")
if #process.args == 0 then
installGitDependencies()
installWallyDependencies()
elseif process.args[1] == "git" then
installGitDepen... | 93 |
ffrostfall/BridgeNet2 | ffrostfall-BridgeNet2-d7fd18a/src/client/bridge.luau | local ClientBridge = {}
local metatable = { __index = ClientBridge }
export type Identity = typeof(setmetatable({} :: {}, metatable))
local function constructor(name: string): Identity
local self = setmetatable({}, metatable)
return self
end
function ClientBridge.Fire() end
function ClientBridge.Connect() end
fu... | 114 |
ffrostfall/BridgeNet2 | ffrostfall-BridgeNet2-d7fd18a/src/client/identifiers.luau | local dataModelTree = require("@src/dataModelTree")
local logStrings = require("@src/logStrings")
local logger = require("@src/logger").new()
local identifierMap = require("@src/identifierMap")
local client = {}
function client.init(tree: dataModelTree.Identity)
for name, id in tree.identifiers:GetAttributes() do
... | 196 |
ffrostfall/BridgeNet2 | ffrostfall-BridgeNet2-d7fd18a/src/client/parallelBridge.luau | local logger = require("@src/logger").new("client (parallel)")
local logStrings = require("@src/logStrings")
local identifierMap = require("@src/identifierMap")
local dataModelTree = require("@src/dataModelTree")
local tree: dataModelTree.Identity
local function disallowed(name: string): never
return logger:fatal(st... | 397 |
ffrostfall/BridgeNet2 | ffrostfall-BridgeNet2-d7fd18a/src/client/process.luau | local RunService = game:GetService("RunService")
local serializer = require("@src/core/serializer")
local deserializer = require("@src/core/deserializer")
local types = require("@src/types")
local dataModelTree = require("@src/dataModelTree")
local logger = require("@src/logger").new("main client process")
local logSt... | 390 |
ffrostfall/BridgeNet2 | ffrostfall-BridgeNet2-d7fd18a/src/core/deserializer.luau | --!native
local signal = require("@pkg/signal")
local idToSignal: { [number]: signal.Identity<...any> } = {}
local deserializer = {}
function deserializer.exists(id: number)
return idToSignal[id] ~= nil
end
function deserializer.registerId(id: number): signal.Identity<...any>
idToSignal[id] = signal()
return idT... | 408 |
ffrostfall/BridgeNet2 | ffrostfall-BridgeNet2-d7fd18a/src/core/serializer.luau | --!native
local types = require("@src/types")
local function serializer(queue: types.Queue): types.SerializedPacket
local outgoingEvents: types.SerializedPacket = {
events = {},
buff = buffer.create(0),
}
local idToIndex: { number } = {}
local indexToId: { number } = {}
for i = 1, #queue, 2 do
local id = ... | 230 |
ffrostfall/BridgeNet2 | ffrostfall-BridgeNet2-d7fd18a/src/dataModelTree.luau | local WFC_TIMEOUT = 3
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local RunService = game:GetService("RunService")
local result = require("@src/util/result")
local logStrings = require("@src/logStrings")
local cached: Identity? = nil
export type Identity = {
container: Folder,
remote: RemoteEve... | 707 |
ffrostfall/BridgeNet2 | ffrostfall-BridgeNet2-d7fd18a/src/identifierMap.luau | local idToName: { [number]: string } = {}
local nameToId: { [string]: number } = {}
export type Identifier = number
local identifierMap = {}
function identifierMap.addIdentifier(name: string, id: Identifier)
idToName[id] = name
nameToId[name] = id
end
function identifierMap.removeIdentifier(name: string)
local i... | 145 |
ffrostfall/BridgeNet2 | ffrostfall-BridgeNet2-d7fd18a/src/init.luau | local RunService = game:GetService("RunService")
local clientActor = require("@src/initialization/clientActor")
local serverActor = require("@src/initialization/serverActor")
local clientSerial = require("@src/initialization/clientSerial")
local serverSerial = require("@src/initialization/serverSerial")
local threadC... | 196 |
ffrostfall/BridgeNet2 | ffrostfall-BridgeNet2-d7fd18a/src/initialization/clientSerial.luau | local process = require("@src/client/process")
local identifiers = require("@src/server/identifiers")
local dataModelTree = require("@src/dataModelTree")
local logger = require("@src/logger").new("client")
local logStrings = require("@src/logStrings")
return function()
local treeRes = dataModelTree()
if not treeRes.... | 137 |
ffrostfall/BridgeNet2 | ffrostfall-BridgeNet2-d7fd18a/src/initialization/serverSerial.luau | local process = require("@src/server/process")
local identifiers = require("@src/server/identifiers")
local dataModelTree = require("@src/dataModelTree")
local logger = require("@src/logger").new("server")
local logStrings = require("@src/logStrings")
return function(): ()
local treeRes = dataModelTree(true)
if not ... | 139 |
ffrostfall/BridgeNet2 | ffrostfall-BridgeNet2-d7fd18a/src/logStrings.luau | local errorStrings = {
INSTANCE_NOT_FOUND = "couldn't find instances under replicatedstorage, waitforchild timeout hit",
INSTANCE_NOT_VALID = "bridgenet2's internal instance tree wasnt valid, was it modified?",
ID_PROPERTY_INCORRECT_TYPE = "identifier [%*] has an invalid attribute type, was it modified?",
ACCESS_... | 259 |
ffrostfall/BridgeNet2 | ffrostfall-BridgeNet2-d7fd18a/src/logger.luau | --!optimize 1
export type LogLevel = "trace" | "log" | "warn" | "fatal" | "halt"
local function getNameFromStack()
local name = debug.info(3, "s")
local split = string.split(name, ".")
return `{split[#split - 1]}/{split[#split]}`
end
local logger = {}
local metatable = { __index = logger }
export type Identity = ... | 237 |
ffrostfall/BridgeNet2 | ffrostfall-BridgeNet2-d7fd18a/src/server/bridge.luau | local signal = require("@pkg/signal")
local process = require("@src/server/process")
local identifiers = require("@src/server/identifiers")
local identifierMap = require("@src/identifierMap")
local deserializer = require("@src/core/deserializer")
local ServerBridge = {}
local metatable = { __index = ServerBridge }
exp... | 406 |
ffrostfall/BridgeNet2 | ffrostfall-BridgeNet2-d7fd18a/src/server/identifiers.luau | local dataModelTree = require("@src/dataModelTree")
local logger = require("@src/logger").new("server identifiers")
local logStrings = require("@src/logStrings")
local identifierMap = require("@src/identifierMap")
local counter: Identifier = 1
local container: Folder
export type Identifier = number
local function as... | 172 |
ffrostfall/BridgeNet2 | ffrostfall-BridgeNet2-d7fd18a/src/server/process.luau | --!native
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local dataModelTree = require("@src/dataModelTree")
local types = require("@src/types")
local serializer = require("@src/core/serializer")
local deserializer = require("@src/core/deserializer")
local remote: RemoteEv... | 539 |
ffrostfall/BridgeNet2 | ffrostfall-BridgeNet2-d7fd18a/src/types.luau | --[[
Private
]]
export type Content = unknown
export type SerializedPacket = {
events: {
-- The numbers here don't cost anything, because it's an array.
[number]: {
-- Each value here is an individual call to an event.
[number]: Content,
},
},
-- The IDs are packed into this buffer
buff: buffer,
}
--... | 109 |
ffrostfall/BridgeNet2 | ffrostfall-BridgeNet2-d7fd18a/src/util/result.luau | export type Identity<T> = {
success: true,
value: T,
} | {
success: false,
err: string,
trace: string,
}
return (
(
function<T>(success: boolean, resultOrError: T & string): Identity<T>
if success then
return {
success = true,
value = resultOrError,
}
else
return {
success = fa... | 149 |
nezuo/lapis | nezuo-lapis-e217a22/examples/developer-product-handling/src/server/init.server.luau | local MarketplaceService = game:GetService("MarketplaceService")
local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Lapis = require(ReplicatedStorage.Packages.Lapis)
local Sift = require(ReplicatedStorage.Packages.Sift)
local t = require(ReplicatedStorage.Pa... | 811 |
nezuo/lapis | nezuo-lapis-e217a22/examples/player-data/src/server/init.server.luau | local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Lapis = require(ReplicatedStorage.Packages.Lapis)
local t = require(ReplicatedStorage.Packages.t)
local DEFAULT_DATA = { coins = 100 }
local collection = Lapis.createCollection("PlayerData", {
defaultData... | 394 |
nezuo/lapis | nezuo-lapis-e217a22/src/AutoSave.luau | local RunService = game:GetService("RunService")
local Promise = require(script.Parent.Parent.Promise)
local UPDATE_INTERVAL = 5 * 60
local AutoSave = {}
AutoSave.__index = AutoSave
function AutoSave.new(data)
return setmetatable({
documents = {},
data = data,
gameClosed = false,
ongoingLoads = 0,
ongoin... | 399 |
nezuo/lapis | nezuo-lapis-e217a22/src/Collection.luau | local HttpService = game:GetService("HttpService")
local Document = require(script.Parent.Document)
local Error = require(script.Parent.Error)
local freezeDeep = require(script.Parent.freezeDeep)
local Migration = require(script.Parent.Migration)
local Promise = require(script.Parent.Parent.Promise)
local copyDeep = r... | 1,539 |
nezuo/lapis | nezuo-lapis-e217a22/src/Config.luau | local DataStoreService = game:GetService("DataStoreService")
local Config = {}
Config.__index = Config
function Config.new()
return setmetatable({
config = {
saveAttempts = 5,
loadAttempts = 20,
loadRetryDelay = 1,
showRetryWarnings = true,
dataStoreService = DataStoreService,
},
}, Config)
end
... | 148 |
nezuo/lapis | nezuo-lapis-e217a22/src/Data/Throttle.luau | local RunService = game:GetService("RunService")
local Error = require(script.Parent.Parent.Error)
local Promise = require(script.Parent.Parent.Parent.Promise)
local GET_ASYNC_RETRY_ATTEMPTS = 5
local GET_ASYNC_RETRY_DELAY = 1
local REMOVE_ASYNC_RETRY_ATTEMPTS = 5
local REMOVE_ASYNC_RETRY_DELAY = 1
local getAsyncOp... | 1,598 |
nezuo/lapis | nezuo-lapis-e217a22/src/Data/init.luau | local Error = require(script.Parent.Error)
local Promise = require(script.Parent.Parent.Promise)
local Throttle = require(script.Throttle)
local Data = {}
Data.__index = Data
function Data.new(config)
local throttle = Throttle.new(config)
throttle:start()
return setmetatable({
config = config,
throttle = thr... | 842 |
nezuo/lapis | nezuo-lapis-e217a22/src/Document.luau | local Error = require(script.Parent.Error)
local freezeDeep = require(script.Parent.freezeDeep)
local Promise = require(script.Parent.Parent.Promise)
local noYield = require(script.Parent.noYield)
local function runCallback(document, name, callback)
if callback == nil then
return Promise.resolve()
end
document.c... | 1,928 |
nezuo/lapis | nezuo-lapis-e217a22/src/Document.test.luau | local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Promise = require(ReplicatedStorage.Packages.Promise)
local function defaultOptions()
return {
validate = function(data)
return typeof(data.foo) == "string", "foo must be a string"
end,
defaultData = { foo = "bar" },
}
end
return functio... | 3,181 |
nezuo/lapis | nezuo-lapis-e217a22/src/Error.luau | type ErrorKind =
"RobloxApiError"
| "DefaultDataThrew"
| "SessionLocked"
| "MigrationError"
| "BeforeSaveCloseCallbackThrew"
| "DocumentRemoved"
| "SessionLockStolen"
| "ValidateThrew"
| "ValidateFailed"
local Error = {}
function Error.new(kind: ErrorKind, message: string)
return {
kind = kind,
message ... | 104 |
nezuo/lapis | nezuo-lapis-e217a22/src/Internal.luau | local AutoSave = require(script.Parent.AutoSave)
local Collection = require(script.Parent.Collection)
local Config = require(script.Parent.Config)
local Data = require(script.Parent.Data)
local Internal = {}
function Internal.new(enableAutoSave)
local config = Config.new()
local data = Data.new(config)
local autoS... | 193 |
nezuo/lapis | nezuo-lapis-e217a22/src/Migration.luau | local Migration = {}
function Migration.getLastCompatibleVersion(migrations)
local serverVersion = #migrations
for version = serverVersion, 1, -1 do
local migration = migrations[version]
if migration.backwardsCompatible ~= true then
return version
end
end
return 0
end
function Migration.migrate(migrat... | 321 |
nezuo/lapis | nezuo-lapis-e217a22/src/PromiseTypes.luau | export type Status = "Started" | "Resolved" | "Rejected" | "Cancelled"
export type Promise = {
andThen: (
self: Promise,
successHandler: (...any) -> ...any,
failureHandler: ((...any) -> ...any)?
) -> Promise,
andThenCall: <T...>(self: Promise, callback: (T...) -> ...any, T...) -> any,
andThenReturn: (self: P... | 583 |
nezuo/lapis | nezuo-lapis-e217a22/src/copyDeep.luau | local function copyDeep(value)
if typeof(value) ~= "table" then
return value
end
local new = table.clone(value)
for k, v in value do
if type(v) == "table" then
new[k] = copyDeep(v)
end
end
return new
end
return copyDeep
| 71 |
nezuo/lapis | nezuo-lapis-e217a22/src/freezeDeep.luau | local function freezeDeep(value)
if typeof(value) ~= "table" then
return
end
if not table.isfrozen(value) then
table.freeze(value)
end
for _, innerValue in value do
freezeDeep(innerValue)
end
end
return freezeDeep
| 61 |
nezuo/lapis | nezuo-lapis-e217a22/src/init.test.luau | local ReplicatedStorage = game:GetService("ReplicatedStorage")
local RunService = game:GetService("RunService")
local DataStoreServiceMock = require(ReplicatedStorage.DevPackages.DataStoreServiceMock)
local Internal = require(script.Parent.Internal)
local Promise = require(script.Parent.Parent.Promise)
local function... | 7,547 |
nezuo/lapis | nezuo-lapis-e217a22/src/noYield.luau | local function noYield(callback)
for _ in
function()
callback()
end
do
break
end
end
return noYield
| 34 |
metaindev/connect-plugin | metaindev-connect-plugin-ef41937/Commands/InstanceCmds.luau | local Selection = game:GetService("Selection")
local StarterGui = game:GetService("StarterGui")
local Root = script:FindFirstAncestor("Metain")
local Utils = require(Root.Utils)
local InstanceCmds = {}
function InstanceCmds.create_instance(data: {[string]: any}): {[string]: any}
local className = data.className
if... | 1,205 |
metaindev/connect-plugin | metaindev-connect-plugin-ef41937/Commands/PropertyCmds.luau | local ChangeHistoryService = game:GetService("ChangeHistoryService")
local Root = script:FindFirstAncestor("Metain")
local Utils = require(Root.Utils)
local PropertyCmds = {}
function PropertyCmds.set_property(data: {[string]: any}): {[string]: any}
local target, targetErr = Utils.requireTarget(data.path)
if targe... | 950 |
metaindev/connect-plugin | metaindev-connect-plugin-ef41937/Commands/ScriptCmds.luau | local ScriptEditorService = game:GetService("ScriptEditorService")
local Selection = game:GetService("Selection")
local Root = script:FindFirstAncestor("Metain")
local Utils = require(Root.Utils)
local ScriptCmds = {}
function ScriptCmds.read_script(data: {[string]: any}): {[string]: any}
local target, err = Utils.... | 1,021 |
metaindev/connect-plugin | metaindev-connect-plugin-ef41937/Commands/init.luau | local ReplicatedStorage = game:GetService("ReplicatedStorage")
local ScriptCmds = require(script.Parent.ScriptCmds)
local InstanceCmds = require(script.Parent.InstanceCmds)
local PropertyCmds = require(script.Parent.PropertyCmds)
local function run_luau(data: {[string]: any}): {[string]: any}
local code = data.code
... | 567 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.