local B=Instance.new("\066\105\110\100\097\098\108\101\069\118\101\110\116")function FastSpawn(f,...)(coroutine.wrap(function(...)B.Event:Wait()f(...)end))(...)B:Fire()end function YieldThread()return(function(...)B.Event:Wait()return...end)(coroutine.yield())end function ResumeThread(f,...)coroutine.resume(f,...)B:Fire()end


local SpawnBindable = Instance.new("BindableEvent")

function FastSpawn(fn, ...)
	coroutine.wrap(function(...)
		SpawnBindable.Event:Wait()
		fn(...)
	end)(...)
	
	SpawnBindable:Fire()
end

function YieldThread()
	-- needed a way to first call coroutine.yield(), and then call SpawnBindable.Event:Wait()
	-- but return what coroutine.yield() returned. This is kinda ugly, but the only other
	-- option was to create a temporary table to store the results, which I didn't want to do
	
	return (function(...) SpawnBindable.Event:Wait() return ... end)(coroutine.yield())
end

function ResumeThread(thread, ...)
	coroutine.resume(thread, ...)
	SpawnBindable:Fire()
end
