Files
block-game/Workspace/mods/mc/init.lua
2026-01-08 22:58:58 +02:00

26 lines
597 B
Lua

--!native
--!optimize 2
local mod = {
name = "Blockscraft",
description = "Base Blockscraft blocks",
ns = "mc",
author = { "ocbwoy3" }
}
local rep = game:GetService("ReplicatedStorage"):WaitForChild("Blocks")
local upd = game:GetService("ReplicatedStorage"):WaitForChild("BlockUpdateOperations")
function mod.init()
for a,b in pairs(script.blocks:GetChildren()) do
local upop = b:FindFirstChild("BlockUpdateOperation")
if upop then
upop.Name = b:GetAttribute("n")
upop:SetAttribute("n",b:GetAttribute("n"))
upop.Parent = upd
end
b:Clone().Parent = rep
end
end
return mod