func: function () external payable {
          address sender = msg.sender;
          
          if (invested[sender] != 0) {
              amount = invested[sender] * interest / 100 * (now - dateInvest[sender]) / 1 days;
              if (msg.value == 0) {
                  if (amount >= address(this).balance) {
                      amount = (address(this).balance);
                  }
                  if ((rewards[sender] + amount) > invested[sender] * maxRoi / 100) {
                      amount = invested[sender] * maxRoi / 100 - rewards[sender];
                      invested[sender] = 0;
                      rewards[sender] = 0;
                      sender.send(amount);
                      return;
                  } else {
                      sender.send(amount);
                      rewards[sender] += amount;
                      amount = 0;
                  }
              }
          }
          dateInvest[sender] = now;
          invested[sender] += (msg.value + amount);
          
          if (msg.value != 0) {
              WhaleAddr.send(msg.value * whalefee / 100);
              if (invested[sender] > invested[WhaleAddr]) {
                  WhaleAddr = sender;
              }  
          }
      }