A trader named Willy with some guards appears. He has something he wants to sell. Unfortunately, the Chosen One falls asleep while talking to him and must then choose whether to buy a weapon without knowing exactly what it is.
The script picks one of these weapons at random and then checks to see if the level requirement is met. If the alien blaster was picked, a Luck check must also be passed or the result is re-rolled.
The price Willy asks in dialogue is the weapon's usual barter value (excluding ammunition) multiplied by (11-LK), meaning he'll ask $10000 for the alien blaster if the Luck stat is 10. Just hitting barter may yield a better price.