I need help with note system

Something like this. This will allow your movement inputs to work while the widget is open, it will turn the widget off if it is open and you leave the overlap, it will turn it on if you are overlapping, press the button, and it is not already on, it will turn it off if it is on and you press the button.