Advertisement
giganciprogramowania

l17 destroyDrop

Dec 28th, 2023 (edited)
358
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- Dodajemy tę linijkę na koniec zmiennych na początku kodu
  2. local UX = ReplicatedStorage.UserExperience
  3. -- Dalszy kod aż do funkcji
  4. local function destroyDrop(drop)
  5.    task.spawn(function()
  6.         local oldParent = drop.Parent
  7.         drop.Parent = despawnedDrops
  8. -- Nowy kod
  9.         if drop.Name == "BigChest" then    
  10.             local counter = UX.Counter
  11.             local text = counter.CounterDisplay.CounterFrame.CounterText
  12.             local spawnTime = 10
  13.             counter.Position = drop:FindFirstChildWhichIsA("MeshPart").Position
  14.             counter.Parent = oldParent
  15.             for zegar = 0, spawnTime do
  16.                 local timer = spawnTime - zegar
  17.                 local minutes = math.floor(timer/60)
  18.                 local seconds = timer%60
  19.                 if minutes >= 10 then
  20.                     if seconds >= 10 then
  21.                         text.Text = "The chest will respawn in " .. minutes ..":".. seconds
  22.                     else
  23.                         text.Text = "The chest will respawn in " .. minutes .. ":0" .. seconds
  24.                     end
  25.                 else
  26.                     if seconds >= 10 then
  27.                         text.Text = "The chest will respawn in 0" .. minutes .. ":" .. seconds
  28.                     else
  29.                         text.Text = "The chest will respawn in 0" .. minutes .. ":0" .. seconds
  30.                     end    
  31.                 end
  32.                 wait(1)
  33.             end
  34.             counter.Parent = UX
  35.         else
  36.             wait(4) -- Przeniesione z linijki niżej
  37.         end
  38. -- Koniec nowego kodu
  39.         drop.CurrentPoints.Value = drop.MaxPoints.Value
  40.         drop.Parent = oldParent
  41.     end)
  42. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement