-- Compiled with roblox-ts v2.1.0

local TS = require(game:GetService("ReplicatedStorage"):WaitForChild("rbxts_include"):WaitForChild("RuntimeLib"))
local Renderable = TS.import(script, game:GetService("ReplicatedStorage"), "TS", "components").Renderable
local function renderable(world, _)
	for id, model in world:query(Renderable) do
		if not model.model:IsDescendantOf(game) then
			world:remove(id, Renderable)
		end
	end
	for _id, model in world:queryChanged(Renderable) do
		if model.old and (model.old.model and not model.new) then
			model.old.model:Destroy()
		end
	end
end
return renderable
