Thanks,, it works,, but i think i dont know how to make the mask well.. can you explain me in little words altef? i'm not new to photoshop, but making mask yup

..
Edit 1. i start the script by zero, and put your example in the fist place with my background and mask.. it work... but with the same edges bug.. its my mask, i know :d.. i dont know how to make it well.. When i make mask before for other works, i only set the visible space in black and the rest in white... here dont work that

.