The variables are only accessible on the client-side in your script above.
You can simply just place them on the server-side.
PHP Code:
join("object_buy");
function onCreated()
{
this.item = "Ghost";
this.price = "2500";
this.weapon = "Morphs/Ghost";
}
//#CLIENTSIDE
function onCreated()
{
this.item = "Ghost";
this.price = "2500";
this.weapon = "Morphs/Ghost";
}