is there a way to create a var in a java script that creates a sphere in the editor that displays the range. like the range var in a point light?
that would help me alot to find the best range for my script.
You want the gizmo functions for that. The reference page has an example that does exactly what you want.