You'd have to have a model for an invisible wall, and make a datablock for it.
Then, the code is pretty straight-forward:
function MyInvisibleWallDataBlock::onCollision(%data, %wall, %obj, %pos)
{
if( %obj.getClassName() $= "Player" )
{
%vel = %obj.getVelocity();
%obj.setVelocity( VectorScale(%vel, -7) );
}
}
function InvisibleWallLoop(%this)
{
if( isObject(%this) )
{
$InvisibleWallTrans = %this.getTransform();
$InvisibleWallClass = %this.getClassName();
%this.delete();
%time = 300000; // 5 mins
}
else
{
%this = new ($InvisibleWallClass)()
{
dataBlock = MyInvisibleWallDataBlock;
};
%this.setTransform( $InvisibleWallTrans );
%time = 600000; // 10 mins
}
schedule(%time, 0, "InvisibleWallLoop", %this);
}
Just replace MyInvisibleWallDataBlock with whatever the name is for the datablock of the invisible wall.