Block Attributes
onCollided
This attribute defines the script that is executed when a player collides with the block. An entity can't collide with a normal block except when the block has no collision. The following image shows when the different onCollided triggers are executed.

Examples
onCollidedWithPlayer[0] = "player.sendMessage('You touched me.');";