function StepUtils.onceAtEvent(o,T)assert(type(T)=="\102\117\110\099\116\105\111\110","\066\097\100 \102\117\110\099")local u local function z()if u then u:Disconnect()u=nil end end u=o:Connect(function(...)z()T(...)end)return z end return StepUtils
--[=[
	Invokes the function once at the given event, unless the cancel callback is called.

	@param event Signal | RBXScriptSignal
	@param func function -- Function to call
	@return function -- Call this function to cancel call
]=]
function StepUtils.onceAtEvent(event, func)
	assert(type(func) == "function", "Bad func")

	local conn
	local function cleanup()
		if conn then
			conn:Disconnect()
			conn = nil
		end
	end

	conn = event:Connect(function(...)
		cleanup()
		func(...)
	end)

	return cleanup
end

return StepUtils
