How do you make a weapon store which you can go up to and buy using points u get. And how do you make a points script?

Already then. This is refrased. Ok i want to make it so when i walk up to a gun on the wall that when i hit the x button i grab it. But only if you have enough points. I am trying to make a point system script As well on how to get the money, here is the question for the money system

Now then here is my script on how to buy the weapon with the money. It will be seperate from the player and be on the weapon on the wall.

var weaponCost = 40;
var money = 0;
var weapon : Transform
var xButton : GUIText;

function Update ()
{
    if ( distance >= 15ft )
    {
        xButton.enabled = true;
        if ( money >= weaponCost )
        {
            money - 40;
            if ( Input.GetKeyDown("x") )
            {
                var weapon = Instantiate(weapon, GameObject.Find("WeaponSpawner").transform.position, Quaternion.identity);
            }
        }
    }
    else
    {
        xButton.enabled = false;
    }
}

This is really several unrelated things (as far as programming.) Try this:

o MONEY: Make a Money variable in the player script. Collisions with "Cash" objects add to it. Killing enemies adds to it. Make it public so you can use the inspector to see it. Once that works, add a GUIText so you can display it on the screen. Maybe add a cute "wad of cash" GUITexture next to it.

o TWO WEAPON SWITCH Make it so some key switches between two weapons. In other words, pretend the player has bought all the guns. Make two transforms and drag the weapons in. Use `weaponNum=0` to keep track of which one. If you are using an empty as a mount point for where the gun is, then have the switch key unparent the current gun and teleport it to -9999; parent the new one to the mount point, unteleporting it back to (0,0,0), so it is right on the MP.

o BULLET SWITCH Change the firing script so it fires the correct bullet, based on `weaponNum`, from the end of the gun (you could add an empty to the end of each gun model, to say where the bullet comes from.)

o THREE+ WEAPON SWITCH Add a third gun type. Consider making an array of guns. Test you can switch between all three. Consider playing a "pull hand from pocket" animation to make the switch look more natural.

o SKIP WEAPS WE DON'T HAVE Add `hasPistol`, `hasRPG`, `hasSlingshot` variables. Run the game with some set to `false`. When the player clicks the switch weapon button, have it skip the ones you don't have. If you used an array for guns, use an array `HasThisGun`.

o Finally, the easy step from all that work. start with all but `hasPistol` as false. When you try to buy a gun, check your money, subtract, and set `hasSlingshot` to true.

I also made a store. weaponCost needs to be one less than you want it to cost, so it needs to be 39. Unless you need to have 80 insted of 40

Hey, im Danielvandijk from dimensional games, and i would like to ask you if you would be interested on participating on our latest project “Skullump” and Horror FPS Zombie Survival game, based on call of duty’s zombie module, and we thought you could important now we have about 15 members, and we are looking for scripters since we only have about 2 or 3 capable scriptors, and since you have almoust the same weapon buying system interest we thought you might wanna help, all of our members get paid for their work, and we pay though paypal or cash but we split every game we sell we split the money equaly, please respond if your interested, if you are interested in joining us, add this email addres “dimensionalgamesupport@hotmail.com” and send us an email or visit www.dimensionalgames.webs.com.

-Dimensional games Company Owner