Python text block selection box in add-on?
this is the solution code that will make script search box.

import bpy 

class OBJECT_PT_HelloWorldPanel(bpy.types.Panel):
    """Creates a Panel in the Object properties window"""
    bl_label = "Hello World Panel"
    bl_idname = "OBJECT_PT_hello"
    bl_space_type = 'PROPERTIES'
    bl_region_type = 'WINDOW'
    bl_context = "object"

    def draw(self, context):
        layout = self.layout
        scene = context.scene               
        layout.prop_search(scene, "Script", bpy.data, "texts")


def register():
    bpy.utils.register_module(__name__)
    bpy.types.Scene.Script = bpy.props.StringProperty()


def unregister():
    bpy.utils.unregister_module(__name__)
    del bpy.types.Scene.Script


if __name__ == "__main__":
    register()