You can get the raw hex of a transaction by going to blockchain.info and appending
?format=hex to the URL for the transaction. You can also go to blockcypher, look up the transaction, and click on the button for "api call" under the Advanced details section. This will give you JSON for the transaction and under the outputs section is the script for the output in hex.
In Electrum, you can go to the console and type
where <txid> is the txid. This will give you the raw hex of the transaction.
Then you can take that hex and type
which will give you the decoded version of the transaction. You can chain the two commands together by doing
deserialize(gettransaction("<txid>"))
and get the decoded transaction from the txid.