This is a fairly simple script to show or hide an object. It has more options, such as selecting the object if it is frozen, or opening its object properties window to set the visibility percentage. It also has the handy option of letting you select the previously selected object if you opened the object properties window for the stored object.
UI:
