My script is not working

Usually with these things you will have to interpret the source code and use the Ember Guides to help you.

Additionally studying prior art in existing plugins or Theme Components can be really helpful.