Intune platform scripts cannot be viewed or copied from the portal once they are uploaded, so if the original is lost, the only supported way to get the body back is through Microsoft Graph.
This script connects to Graph, lists the platform scripts in your tenant, and decodes the one you ask for. With no parameters it lists every platform script with its Id and name; with -ScriptId or -Name it prints the decoded body; and with -Path it saves each decoded script to a .ps1 file. It is read-only.