Metamorphic modular robots are versatile systems composed of a set of independent modules. These modules are able to deliberately change their overall topology in order to adapt to new circumstances, perform new tasks, or recover from damage. The modules considered in this paper are cubic shapes, and we assume that each of them has a separate computational resources and it is equipped with specialized sensors to perceive the environment. In this paper, we demonstrate the ability of these robots to evolve the topology of the whole structure in order to achieve, surround and transport target objects dispersed in the environment. While performing its task, the robot may be split up in order to cope with environmental variations. Our work integrates a simplified model of biological hormone system to generate inputs for a finite-state machine (FSM) that controls the evolution process.