How to make uis not activate after clickign button

i want it so that whenever i click my screen with uis it will activate a function

but when i click a button (my sell button) it activates again messing up the whole script.

so all i want is a way to have a bnutton that covers the whole screens that you can click that doesnt make the function activate when i click other buttons

Or you can just add boolean variables on the functions and set them to true whenever they activate and false whenever they deactivate, and remember to add checks for example

if not isActivated then
   return
elseif isActivated == true then
--Code
end

zindex?
(set the zindex of everyting - the button to like 5)