This script jumps out at me: Show Custom Dialog ["Message"; "This asset is currently checked in."]
This script is not compatible with Instant Web Publishing. You can check your entire script over for incompatible steps by opening it in the script editor and selecting "Web Publishing" from the show compatibility drop down in the left corner.
To fix this, you'll need to script around the limitations of IWP. You could, for example, create a layout with the layout text, "This asset is currently checked in" and switch to it instead of using Show Custom Dialog.
I know that Show Custom Dialog does not work in the IWP, but I'm not testing it under any conditions where that script would even be called. I did select "Web Publishing" and the only one grayed out is this Show Custom Dialog script. While I appreciate your insight, I am not really bothered if a user attempts to check in an available asset in the IWP, because I don't find it so disastrous that the button seemingly does no action.
Update: I figured it out; when the "Freeze Window" script was removed, it began to work it IWP!