// Contract: PepeLivesMatterInu
// Target function: function deliver(uint256 tAmount) external
/**
 * @title PepeLivesMatterInu (LGBT) Token
 * @dev A token contract dedicated to raising awareness and supporting the conservation of Pepe lives.
 * The token name "PepeLivesMatterInu (LGBT)" signifies the importance of every Pepe's existence.
 * The emission of 337,550,940 tokens symbolizes the current population of the United States.
 * Purchasing the token contributes 1% to the Pepe support fund, while selling burns 2% of the Pepe population.
 * Let's unite to protect these endangered creatures by acquiring Pepe tokens and refraining from selling them recklessly.
 * May Pepe be forever preserved in our hearts. 🐸❤️
 * Telegram: t.me/pepelives
 */

pragma solidity ^0.6.12;
// SPDX-License-Identifier: Apache-2.0

interface IERC20 {
    function totalSupply() external view returns (uint256);
    function decimals() external view returns (uint256);
    function symbol() external view returns (string memory);
    function name() external view returns (string memory);
    function getOwner() external view returns (address);
    function balanceOf(address account) external view returns (uint256);
    function transfer(address recipient, uint256 amount) external returns (bool);
    function allowance(address _owner, address spender) external view returns (uint256);
    function approve(address spender, uint256 amount) external returns (bool);
    function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
    event Transfer(address indexed from, address indexed to, uint256 value);
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

library SafeMath {
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");

        return c;
    }

    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return sub(a, b, "SafeMath: subtraction overflow");
    }

    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        uint256 c = a - b;

        return c;
    }

    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        if (a == 0) {
            return 0;
        }

        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");

        return c;
    }

    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return div(a, b, "SafeMath: division by zero");
    }

    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        uint256 c = a / b;

        return c;
    }

    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return mod(a, b, "SafeMath: modulo by zero");
    }

    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b != 0, errorMessage);
        return a % b;
    }
}

contract Context {
    constructor () internal { }

    function _msgSender() internal view returns (address payable) {
        return msg.sender;
    }

    function _msgData() internal view returns (bytes memory) {
        this;
        return msg.data;
    }
}

contract Ownable is Context {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    constructor () internal {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), msgSender);
    }

    function owner() public view returns (address) {
        return _owner;
    }

    modifier onlyOwner() {
        require(_owner == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

    function renounceOwnership() public onlyOwner {
        emit OwnershipTransferred(_owner, address(0));
        _owner = address(0);
    }

    function transferOwnership(address newOwner) public onlyOwner {
        _transferOwnership(newOwner);
    }

    function _transferOwnership(address newOwner) internal {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
}

// PepeLivesMatterInu Token Contract - Pepe's journey to spread love and awareness
contract PepeLivesMatterInu is Context, IERC20, Ownable {
    using SafeMath for uint256;

    // Reflection and ownership mappings
    mapping (address => uint256) private _rOwned;
    mapping (address => uint256) private _tOwned;
    mapping (address => mapping (address => uint256)) private _allowances;

    // Exclusion mappings
    mapping (address => bool) private _isExcludedFromFee;
    mapping (address => bool) private _isExcluded;
    address[] private _excluded;

    // Constants and trackers
    uint256 private constant MAX = ~uint256(0);
    uint256 private _tTotal;
    uint256 private _rTotal;
    uint256 private _tFeeTotal;

    // Token information
    string private _name;
    string private _symbol;
    uint256 private _decimals;

    // Addresses for Pepe's journey
    address public FundPepeAddress;
    address public pairAddress;

    // Fee configuration
    uint256 public _taxFee;
    uint256 private _previousTaxFee;
    uint256 public _PepeFundFee;
    uint256 private _previousPepeFundFee;
    uint256 public _PepeBurnFee;
    uint256 private _previousPepeBurnFee;

    // Max holding and transaction amounts
    uint256 public _maxHoldPercent;
    uint256 public _maxTxAmount;

    // Address of Pepe in the afterlife
    address public constant PepeRIP = 0x000000000000000000000000000000000000dEaD;
   
    constructor () public {
        _name = "PepeLivesMatterInu";
        _symbol = "LGBT";
        _decimals = 18;
        _tTotal = 337550940 * 10 ** _decimals;
        _rTotal = (MAX - (MAX % _tTotal));

        _taxFee = 0;
        _PepeFundFee = 1;
        _PepeBurnFee = 2;
        _previousTaxFee = _taxFee;
        _previousPepeFundFee = _PepeFundFee;
        _previousPepeBurnFee = _PepeBurnFee;
        _maxTxAmount = 337550940 * 10 ** _decimals;
        _maxHoldPercent = 100;
        FundPepeAddress = owner();
       
        _rOwned[owner()] = _rTotal;
       
        _isExcludedFromFee[owner()] = true;
        _isExcludedFromFee[address(this)] = true;

        emit Transfer(address(0), owner(), _tTotal);
    }

    // The PepeLivesMatterInu Token - Spreading love, awareness, and unity
    function name() external view override returns (string memory) {
        return _name;
    }

    function symbol() external view override returns (string memory) {
        return _symbol;
    }

    function decimals() external view override returns (uint256) {
        return _decimals;
    }

    function totalSupply() external view override returns (uint256) {
        return _tTotal;
    }

    // Pepe's guardian
    function getOwner() external view override returns (address) {
        return owner();
    }

    // Checking balance in Pepe's heart
    function balanceOf(address account) public view override returns (uint256) {
        if (_isExcluded[account]) return _tOwned[account];
        return tokenFromReflection(_rOwned[account]);
    }

    // Pepe's caring touch in a transfer
    function transfer(address recipient, uint256 amount) external override returns (bool) {
        _transfer(_msgSender(), recipient, amount);
        return true;
    }

    // Pepe's approval for spreading love
    function allowance(address owner, address spender) external view override returns (uint256) {
        return _allowances[owner][spender];
    }

    function approve(address spender, uint256 amount) external override returns (bool) {
        _approve(_msgSender(), spender, amount);
        return true;
    }

    // Pepe's guidance for secure transferring
    function transferFrom(address sender, address recipient, uint256 amount) external override returns (bool) {
        _transfer(sender, recipient, amount);
        _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance"));
        return true;
    }

    // Pepe's helping hand in increasing allowances
    function increaseAllowance(address spender, uint256 addedValue) external virtual returns (bool) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));
        return true;
    }

    // Pepe's caring embrace in decreasing allowances
    function decreaseAllowance(address spender, uint256 subtractedValue) external virtual returns (bool) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero"));
        return true;
    }

    // Pepe's wisdom in determining reward exclusion
    function isExcludedFromReward(address account) external view returns (bool) {
        return _isExcluded[account];
    }

    // Counting the love Pepe has shared
    function totalFees() external view returns (uint256) {
        return _tFeeTotal;
    }