Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- ================ Stary kod ==================
- game.ReplicatedStorage.Remotes.EquipPet.OnServerEvent:Connect(function(player,
- petName, id)
- local petModel = game.ReplicatedFirst.Pets:FindFirstChild(petName):Clone()
- petModel.Parent = workspace.Players:FindFirstChild(player.Name)
- -- ============== Komentujemy / usuwamy linijkę ==============
- --player.Values.Damage.Value += petModel.Damage.Value
- petModel.Id.Value = id
- end)
- game.ReplicatedStorage.Remotes.UnequipPet.OnServerEvent:Connect(function(player,
- petName, id)
- local playerFolder = workspace.Players:FindFirstChild(player.Name)
- for i, pet in pairs(playerFolder:GetChildren()) do
- if pet.Id.Value == id then
- -- ============== Komentujemy / usuwamy linijkę ==============
- -- player.Values.Damage.Value -= pet.Damage.Value
- pet:Destroy()
- end
- end
- end)
- -- ======================Nowy kod=============================
- game.ReplicatedStorage.Remotes.Upgrade.OnServerEvent:Connect(function(player, cost, damage)
- player.leaderstats.Shards.Value -= cost
- player.Values.Damage.Value = damage
- end)
- -- ======================Koniec nowego kodu =================
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement