Detecting "SendNotification"

These could be beneficial to you.

SetCore
Another article explaining how to detect notifications

SetCore should likewise be placed in a pcall because it has the potential to fail.

local Success, Error = pcall(function()
    --Your code
end)