You'd need the button's script to look up the asset in question before line 1 of the above script executes. Your button could pass the asset ID as a script parameter and then get ( ScriptParameter ) can extract the asset ID passed to it. This can allow you to modify the script to work with both buttons dedicatd to a specific asset ID or a Generalized one that works from the asset ID of the current record. (Don't specify a script parameter for the generalized button.)
I'm not looking up the actual starter solution here so I may not have the exactly correct field name:
Set Variable [$AssetID ; Value: Get ( ScriptParameter ) ]
If [Not IsEmpty ( $AssetID ) ]
Enter Find Mode 
Set Field [Assets::AssetID ; $AssetID ]
Perform Find 
If [Assets::Status = "Not available"]
thanks for the reply...
I'm not understaning a thing or two... man I'm more novicer than I had thought (or hoped)
where does the value come from that I am to feed to the script? (the Item number (Asset ID)) I just want that to be in the script...
set asset ID to 777
proceed with script...
(is that the Set Field?)
where does the value come from that I am to feed to the script?
You indicated that you wanted each button to work with a specific asset ID, correct? In button setup, when you click perform script as the button option and click specify to select the script to be performed, you get a dialog box with a text box labeled "Optional script parameter". You'd enter the asset ID there so that clicking this button passes the same Asset ID to the script as a script parameter. Get ( ScriptParameter ) then extracts this value so that your script can use it.
You would then either create a new record to log the fact that the asset was loaned out, or find and update an existing record to log the fact that it has been returned. The example script performs a find, but it probably needs to specify an additional criterion to find the record where the asset was loaned out but which has an empty date returned field so that it only finds the most recent record for this asset ID.