Personally I'd just save the unit's handleid and a value onto a hashtable after he has attacked, remove the buff then create a timer counting down for 12 seconds, that way if he drops the item and picks it up again he wont get the buff because you can check if the hashtable has a value on his handleid + custom value you assigned earlier. After the 12 seconds if the unit has the item then add the buff again, but if the unit doesn't have the item then remove the value from the hashtable so if he picks it up again it'll instantly affect him instead of waiting.