To create a partial rocking mode in a building structure during an earthquake, two or more rigid cores with joint connection to the foundation, and capable of moving in the two main directions of the building's plan, can be used. A rigid core with a hinge connection to the foundation is essentially unstable. However, two rigid cores can be connected together by springs and dampers in certain floors to create a stable structure. At the same time, the structure shows a rocking behavior in which the building moves almost as a rigid body. In fact, the effects of all modes other than the fundamental one is almost eliminated. The use of yielding or friction dampers leads to permanent displacements in the structure in an earthquake. Therefore, in this study pre-compressed springs were employed, which do not create any permanent displacement. The pre-compressed springs were used to provide the structure with initial stiffness and prevent any displacement by small forces. Since an elastic spring does not have any damping, it was decided to control the structural displacements by viscous dampers in certain floors. Finally, the proposed structure underwent static and time-history analyses in plastic range, and the results suggested the desirable behavior of the proposed structure. In particular, there were no permanent displacements left in the structure after the earthquake.