local S=game:GetService("\082\101\112\108\105\099\097\116\101\100\083\116\111\114\097\103\101")local K=require(S.Packages.sapphire_jecs)local O=require(S.components)local V={}function V.start()local S=K.spawner(O.part,O.position,O.velocity)local V=2147483647 for K=1,1000,1 do local W=Random.new(math.random(V))local m=Instance.new("\080\097\114\116")m.Anchored=true local n=Vector3.new(W:NextNumber(-2.5,2.5),W:NextNumber(-2.5,2.5),W:NextNumber(-2.5,2.5))local M=S.spawn_with_handle(m,Vector3.zero,Vector3.zero)M:set(O.velocity,n)m.Parent=workspace end end return V
--!strict
local ReplicatedStorage = game:GetService("ReplicatedStorage")

local ecs = require(ReplicatedStorage.Packages.sapphire_jecs)
local components = require(ReplicatedStorage.components)

local spawn_parts = {}

function spawn_parts.start()
    local spawner = ecs.spawner(components.part, components.position, components.velocity)

    local max = 2147483647

    for _ = 1, 1_000 do
        local rand = Random.new(math.random(max))

        local part = Instance.new("Part")
        part.Anchored = true

        local random_velocity =
            Vector3.new(rand:NextNumber(-2.5, 2.5), rand:NextNumber(-2.5, 2.5), rand:NextNumber(-2.5, 2.5))
        local handle = spawner.spawn_with_handle(part, Vector3.zero, Vector3.zero)
        handle:set(components.velocity, random_velocity)

        part.Parent = workspace
    end
end

return spawn_parts
