Advertisement
Sungmingamerpro13

Minion System (STORY GAME) (Script)

Oct 6th, 2024 (edited)
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 0.54 KB | None | 0 0
  1. --- Script Of Humanoid ---
  2.  
  3. script.Parent.Died:Connect(function()
  4.     game.ReplicatedStorage.MinionsFound.Value += 1
  5. end)
  6.  
  7. --- Script Of MainScript ---
  8.  
  9. local MinionsFound = game.ReplicatedStorage.MinionsFound
  10. local MinionsModel = game.ReplicatedStorage.MinionsModel
  11.  
  12. MinionsModel.Parent = workspace
  13.  
  14. SetObjectives("Minions Found: "..MinionsFound.Value)
  15.  
  16. while wait() do
  17.     SetObjectives("Minions Found: "..MinionsFound.Value)
  18.    
  19.     if MinionsFound.Value == 4 then
  20.         wait(1)
  21.         break
  22.     end
  23. end
  24. ClearObjectives()
  25.  
  26. MinionsModel:Destroy()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement