You are wrong, CGT do not apply in script for script transaction. Only if you sell a new shares in that casethe cost to purchase original shares become yours base cost.