local function B(B,r)r=r or{}local z=Runtime.useEventCallback()local n=Instance.new(B)for B,t in pairs(r)do if type(t)=="\102\117\110\099\116\105\111\110"then if z then z(n,B,t)else n[B]:Connect(t)end elseif type(B)=="\110\117\109\098\101\114"then t.Parent=n elseif type(B)=="\116\097\098\108\101"then B[t]=n if r.Name==nil then n.Name=t end else n[B]=t end end return n end return B

local function create(className, props)
	props = props or {}

	local eventCallback = Runtime.useEventCallback()

	local instance = Instance.new(className)

	for key, value in pairs(props) do
		if type(value) == "function" then
			if eventCallback then
				eventCallback(instance, key, value)
			else
				instance[key]:Connect(value)
			end
		elseif type(key) == "number" then
			value.Parent = instance
		elseif type(key) == "table" then
			key[value] = instance

			if props.Name == nil then
				instance.Name = value
			end
		else
			instance[key] = value
		end
	end

	return instance
end

return create
