Ho do I generate the output script of a bitcoin transaction? When I mean output script I mean the output script from step 11 from this question:
Redeeming a raw transaction step by step example required

Then the actual output script: 76 a9 14 a2fd2e039a86dbcf0e1a664729e09e8007f89510 88 ac ( this is transferring funds back to address 1FromKBPAS8MWsk1Yv1Yiu8rJbjfVioBHc )

In this example the responder used Pkscript from the input of the previous trasaction. However there is no explanation how the hex &quot;a2fd2e039a86dbcf0e1a664729e09e8007f89510&quot; is generated itself. I'm asking because, I don't know what I would insert if I want to use another address as output. As I understand (maybe not) this hex is somehow generated from the bitcoin address &quot;1FromKBPAS8MWsk1Yv1Yiu8rJbjfVioBHc&quot;. Is this correct? And how is it done?
This is a P2PKH (Pay-to-public-key-hash) address which means a2fd2e039a86dbcf0e1a664729e09e8007f89510 is the hash of your public key. Here is a step by step guide on how to go from public key to address