NullReferenceException:Object reference not set to an instance of an object BoxScript.OnPointerClick

Your “ms” object is null. If “Main” is a script, you have to do following:
ms = GetComponent<Main>();

Please have a look here for proper usage of code tags: