✓ Accepted answer
Learn how to use DataStores. Trust me, I have experience, I completely redid my whole store system so no values are used, only datastores. and they are fairly simple once you get used to it. For me, I have a storeGui, so I had to use the remote event, but if this is like a store like buttons made of bricks, should be simple. In case you need remoteEvent, i included that too here
http://wiki.roblox.com/index.php?title=RemoteFunction_and_RemoteEvent_Tutorial
http://wiki.roblox.com/index.php?title=Data_store
though if you need some help, contact me through roblox and I can give you a example of my **GUI ** store scripts.
But this is only for if you want it to be cross server, really.
For the Data Stores, I highly recommend them as they are highly versatile, and is easier then setting up an array. Basically, you set the value in a datastore, and when a player respawns or enters a new game, you could have something like
hasFirstSword = somedatastorethathasbeenaccessedhereandiwillnotexplainhowtodothatbecauseisuckatexplaining
if hasFirstSword == true then
end
ooooor to make it moreversatile
function give(swordval, anyothervariablesneeded)
if swordval:GetAsync(wahteveryourkeyis) == true then
end
end
I think having one function with a interchangable variable would work better then the if statement over and over again. Either way you have to call on the datastore before hand, and I suggest making the key player based, such as
key = player.Name .."_Swords"
just so you dont run into a problem with using the player name only as a key.