Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- We find the LoadData function and look for the following fragment:
- for key, folder in pairs(data) do
- if key == "leaderstats" then
- for item, amount in pairs(folder) do
- if item == "Coins" then
- player.leaderstats.Coins.Value = amount
- elseif item == "Diamonds" then
- player.leaderstats.Diamonds.Value = amount
- -- Adding new code
- elseif item == "Shards" then
- player.leaderstats.Shards.Value = amount
- -- End of new code
- -- Continuing with the code until the following fragment:
- bank.OnServerEvent:Connect(function(player, action, currency, amount)
- if action == "+" then
- if currency == "Coins" then
- player.leaderstats.Coins.Value += amount
- elseif currency == "Diamonds" then
- player.leaderstats.Diamonds.Value += amount
- -- Adding a new piece of code
- elseif currency == "Shards" then
- player.leaderstats.Shards.Value += amount
- -- End of new code
- -- We reach the end of the existing code and add
- local shards = remotes.Shards
- shards.OnServerEvent:Connect(function(player, drop)
- player.leaderstats.Shards.Value += drop
- end)
Add Comment
Please, Sign In to add comment