Advertisement
giganciprogramowania

l18 main server

Jan 5th, 2024
847
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- ================  Stary kod ==================
  2. game.ReplicatedStorage.Remotes.EquipPet.OnServerEvent:Connect(function(player,
  3.     petName, id)
  4.     local petModel = game.ReplicatedFirst.Pets:FindFirstChild(petName):Clone()
  5.     petModel.Parent = workspace.Players:FindFirstChild(player.Name)
  6. -- ============== Komentujemy / usuwamy linijkę ==============
  7.     --player.Values.Damage.Value += petModel.Damage.Value
  8.     petModel.Id.Value = id
  9. end)
  10.  
  11. game.ReplicatedStorage.Remotes.UnequipPet.OnServerEvent:Connect(function(player,
  12.     petName, id)
  13.     local playerFolder = workspace.Players:FindFirstChild(player.Name)
  14.     for i, pet in pairs(playerFolder:GetChildren()) do
  15.      if pet.Id.Value == id then
  16. -- ============== Komentujemy / usuwamy linijkę ==============
  17.      --    player.Values.Damage.Value -= pet.Damage.Value
  18.          pet:Destroy()
  19.      end
  20.     end
  21. end)
  22. -- ======================Nowy kod=============================
  23. game.ReplicatedStorage.Remotes.Upgrade.OnServerEvent:Connect(function(player, cost, damage)
  24.     player.leaderstats.Shards.Value -= cost
  25.     player.Values.Damage.Value = damage
  26. end)
  27. -- ======================Koniec nowego kodu =================
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement