integer    t;
integer    hours;
integer    minutes;
integer    seconds;

default

{
    touch_start(integer param)
    {
        t = (integer)llGetWallclock(); // seconds since midnight

        // one hour has 3600 seconds
        hours = t / 3600; // get hours (integer division chops off the decimals)

        // the modulo operator % gets the remainder of a divison
        // in this case, the remaining seconds after removing the full hours
        minutes = (t % 3600) / 60; // divide by 60 because we want minutes, chops off decimals again
        seconds = t % 60; // get the seconds that didn't fit into full minutes

        llInstantMessage(llGetOwner(), "Touched on " + llGetDate() + " at " + (string)hours + ":" +(string)minutes + " by " + llDetectedName(0));
        //Above line Messages the object owner with the date/time/name of who touched the object.
        
        llGiveInventory(llDetectedKey(0),"NAME_OF_OBJECT_TO_GIVE"); //What is given when the object is touched.
    }
    

//    on_rez(integer start_param)
//    {
//        llSetText(llGetObjectName(), <1,1,1>, 1.5); //Pulls the name of the object when rezzed and makes it floating text.
//          // Normally you would use state_entry to show floating text, but with llGetObjectName you want it on_rez so it updates.
//    }  

}