Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function updateDamage()
- local playerPets = playersFolder[player.Name]:GetChildren()
- for _, pet in pairs(playerPets) do
- local attackValue = pet.Attack.Value
- if attackValue then
- local drop = attackValue.Parent
- local currentPoints = drop.CurrentPoints
- currentPoints.Value = math.max(currentPoints.Value - pet.Damage.Value, 0)
- if currentPoints.Value == 0 then
- for _, pet in pairs(playerPets) do
- pet.Attack.Value = nil
- end
- for i, item in pairs(drop:GetChildren()) do
- if item.Name == "Reward" then
- remotes.Bank:FireServer("+", item.Value, item.Amount.Value)
- end
- end
- destroyDrop(drop)
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement