I need to detect both situations - child added and removed - in one connection. What function can be used for that? If "Changed", then what parameter?
You can use the events Instance.ChildAdded:Connect() and Instance.ChildRemoved. Not sure what you mean by "in one connection" though, if you were talking about the function not having to run every second, Events only fire the function once the said event happens.
YourInstance.ChildAdded:Connect(function(theNewChild) --Code end)
Reference: https://developer.roblox.com/en-us/api-reference/class/Instance