on load: set {maxAmount} to 20 on damage: if attacker is a player: set {_} to number of all golden apples in attacker's inventory if {_} is more than {maxAmount}: remove ({_}-{maxAmount}) of golden apple from the attacker's inventory add ({_}-{maxAmount}) of golden apple to attacker's enderchest send "&cMaksymalnie mozesz miec przy sobie %{maxAmount}% koxów! %({_}-{maxAmount})% zostalo przekazanych do twojego enderchesta." to attacker