on script load:
set {prices::iron ingot} to 10
set {prices::gold ingot} to 15
# etc
on right click: # all the information you gave, edit to your liking to fit your actual needs
loop {prices::*}:
set {_item} to loop-index parsed as item
set {_amount} to amount of {_item} in player's inventory
set {_reward} to {_amount} * loop-value
send formatted "You sold %{_amount}%x %{_item}% for %{_reward}%" to player
add {_reward} to player's balance
remove {_amount} of {_item} from player
delete {_item}, {_amount} and {_reward}
something like this should work, untested