local I=script.Parent.Parent local p=require(I.utils.RunService)return function(I)local l=I.useEffect local function t(I)l(function()local l=p.RenderStepped:Connect(I)return function()local I,p=pcall(function()l:Disconnect()end)if not I then print("\065\110 \101\114\114\111\114 \111\099\099\117\114\114\101\100\058 "..p)end end end)end return t end
local srcWorkspace = script.Parent.Parent

local RunService = require(srcWorkspace.utils.RunService)

return function(Roact)
	local useEffect = Roact.useEffect

	local function useFrame(onFrame)
		useEffect(function()
			local connection = RunService.RenderStepped:Connect(onFrame)

			return function()
				local success, message = pcall(function()
					connection:Disconnect()
				end)
				if not success then
					print("An error occurred: " .. message)
				end
			end
		end)
	end

	return useFrame
end
