SHOW:
|
|
- or go back to the newest paste.
1 | -- Znajdujemy funckję LoadData i szukamy następującego fragmentu: | |
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 | -- Dodajemy nowy kod | |
10 | elseif item == "Shards" then | |
11 | player.leaderstats.Shards.Value = amount | |
12 | -- Koniec nowego kodu | |
13 | -- Dalszy kod aż do następującego fragmentu: | |
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 | -- Dodajemy nowy fragment kodu | |
21 | elseif currency == "Shards" then | |
22 | player.leaderstats.Shards.Value += amount | |
23 | -- Koniec nowego kodu | |
24 | -- Docieramy do końca istniejącego kodu i dodajemy | |
25 | local shards = remotes.Shards | |
26 | shards.OnServerEvent:Connect(function(player, drop) | |
27 | player.leaderstats.Shards.Value += drop | |
28 | end) |