SHOW:
|
|
- or go back to the newest paste.
| 1 | -- We find the LoadData function and look for the following fragment: | |
| 2 | for key, folder in pairs(data) do | |
| 3 | if key == "leaderstats" then | |
| 4 | for item, amount in pairs(folder) do | |
| 5 | if item == "Coins" then | |
| 6 | player.leaderstats.Coins.Value = amount | |
| 7 | elseif item == "Diamonds" then | |
| 8 | player.leaderstats.Diamonds.Value = amount | |
| 9 | -- Adding new code | |
| 10 | elseif item == "Shards" then | |
| 11 | player.leaderstats.Shards.Value = amount | |
| 12 | -- End of new code | |
| 13 | -- Continuing with the code until the following fragment: | |
| 14 | bank.OnServerEvent:Connect(function(player, action, currency, amount) | |
| 15 | if action == "+" then | |
| 16 | if currency == "Coins" then | |
| 17 | player.leaderstats.Coins.Value += amount | |
| 18 | elseif currency == "Diamonds" then | |
| 19 | player.leaderstats.Diamonds.Value += amount | |
| 20 | -- Adding a new piece of code | |
| 21 | elseif currency == "Shards" then | |
| 22 | player.leaderstats.Shards.Value += amount | |
| 23 | -- End of new code | |
| 24 | -- We reach the end of the existing code and add | |
| 25 | local shards = remotes.Shards | |
| 26 | shards.OnServerEvent:Connect(function(player, drop) | |
| 27 | player.leaderstats.Shards.Value += drop | |
| 28 | end) | |
| 29 |