Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- We scroll down to the updateDamage function and look for the loop
- for i, item in pairs(drop:GetChildren()) do
- if item.Name == "Reward" then
- remotes.Bank:FireServer("+", item.Value, item.Amount.Value)
- end
- end
- -- Here begins the new code
- local lucky = false -- preparing for UX
- local reward = 0
- local random = math.random(1,100)
- local loot = require(drops.Loot)
- local name = drop.Name
- local shardDrop = loot.drop
- for i, v in pairs(shardDrop) do
- if name == i then
- if v.chance >= random then
- reward = v.reward
- remotes.Shards:FireServer(reward)
- lucky = true -- preparing for UX
- -- after writing the line below, we look for the destroyDrop function and add the same parameters (lucky, reward) as in this bracket
- destroyDrop(drop, lucky, reward)
- break
- else
- destroyDrop(drop)
- end
- end
- end
- -- Here ends the new code
- -- remove the line below
- destroyDrop(drop)
Add Comment
Please, Sign In to add comment