This is a script for users with wireless headphones that are not pausing music after disconnecting. So perfect choose for Airdots.
I tried many scripts and everytime spotify was still playing for a few seconds before pausing. So I decided to make a script which will first mute music volume and then pausing spotify. At the end music volume will be unmuted. It works perfect!
DONT FORGET TO SET YOUR HEADPHONES IN "WHEN BT IS CONNECTED" BLOCK
Also you can edit DELAY block when you still hear music after few seconds. (13s was fine for me