Ok after some trial and errors I finally found a way to get a common event to call a script function up.
Code1:
This goes in the common event that have to get triggered by something...
-Common Event insert-
Script:
<name here>
Code 2:
This is in an empty script page in script editor...
Script...