To those who asked how it works and if you need a logitech mouse.
First, yes, it works.
Yes, you need a logitech mouse, my G403, for example.
•Download the Logitech G HUB program
•Create a new profile.
•Add the Script.
In case of doubt, search on youtube how to use LUA in logitech