How do i code a script as variable?

I am trying to make an inventory, and i want different items to do different things, so in the SriptableObject, how do i assign scripts?

    public int id;
    public string ItemName;
    public int value;
    public Sprite icon;
   //public Script FunctionScript; <

having one script doesn’t work, i need one function to be able to drag in scripts like GameObject, so how do i do this?