Is there a way to bind a function

Recently, I have been trying to figure out if there is a way to check if a function is running, on one script and I could disconnect it from another script, but I have zero clue if this is possible.

what I mean by this

so imagine using ContentActionService:BindAction, this would bind a function and it would be activated when pressing a keycode, and then you could Unbind it in a different script, but what if you can Bind a function without a keycode, and then you could unbind that function from a different script