blazer453
|
  |
| Joined: 05 Apr 2009 |
| Total Posts: 1187 |
|
|
| 31 Dec 2012 11:00 AM |
Can someone tell me how I can change this so it does not take Kos away when you purchase a sword?
Player=script.Parent.Parent.Parent.Parent.Parent script.Parent.Text=tostring(script.Parent.ItemName.Value)..": "..tonumber(script.Parent.Cost.Value).." "..tostring(script.Parent.Currency.Value) script.Parent.MouseButton1Click:connect(function() if Player:findFirstChild("leaderstats") then if Player.leaderstats[script.Parent.Currency.Value].Value>=tonumber(script.Parent.Cost.Value) then Player.leaderstats[script.Parent.Currency.Value].Value=Player.leaderstats[script.Parent.Currency.Value].Value-tonumber(script.Parent.Cost.Value) game.Lighting[script.Parent.ItemName.Value]:Clone().Parent=Player.Backpack game.Lighting[script.Parent.ItemName.Value]:Clone().Parent=Player.StarterGear end end end) |
|
|
| Report Abuse |
|
|
blazer453
|
  |
| Joined: 05 Apr 2009 |
| Total Posts: 1187 |
|
| |
|
dradra44
|
  |
| Joined: 11 Jul 2008 |
| Total Posts: 1040 |
|
|
| 31 Dec 2012 12:20 PM |
Player=script.Parent.Parent.Parent.Parent.Parent script.Parent.Text=tostring(script.Parent.ItemName.Value)..": "..tonumber(script.Parent.Cost.Value).." "..tostring(script.Parent.Currency.Value) script.Parent.MouseButton1Click:connect(function() if Player:findFirstChild("leaderstats") then if Player.leaderstats[script.Parent.Currency.Value].Value>=tonumber(script.Parent.Cost.Value) then game.Lighting[script.Parent.ItemName.Value]:Clone().Parent=Player.Backpack game.Lighting[script.Parent.ItemName.Value]:Clone().Parent=Player.StarterGear end end end)
Try that. |
|
|
| Report Abuse |
|
|
blazer453
|
  |
| Joined: 05 Apr 2009 |
| Total Posts: 1187 |
|
|
| 31 Dec 2012 12:24 PM |
| Thanks! It worked perfectly! |
|
|
| Report Abuse |
|
|