Well, why do you have the onCreated event in there man you don't need that.

Just use mouse down as well instead of on action mouse. Give me a few moments to fix that up for you.
PHP Code:
//#CLIENTSIDE
function onMouseDown(mousebutton){
if ( mousebutton == "leftmousebutton" )
{
new GuiWindowCtrl( shopwin ) {
profile = GuiBlueWindowProfile;
x = 10;
y = 10;
destroyonhide=true;
width = 160;
height = 80;
new GuiMLTextCtrl( shopitem ) {
profile = GuiBlueMLTextProfile;
x = 10;
y = 20;
width = 160;
height = 1;
text = this.itemname;
}
}
}
}
Also a suggestion would be to format your scripts with styling so they are more readable bro.

Otherwise nice work.