Advertisement
Guest User

Untitled

a guest
Jul 20th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. -- Synapse Decompiler
  2. -- Purchase Here: https://brack4712.xyz/synapse/purchase/
  3.  
  4. local player = game.Players.LocalPlayer
  5. player.HasMission.Value = true
  6. local lastCount = 0
  7. local amount = math.random(5, 10)
  8. local counter = Instance.new("IntValue", player)
  9. counter.Name = "KillCounter"
  10. local objectiveGui = game.ReplicatedStorage.Guis.MissionObjective:clone()
  11. objectiveGui.Parent = script.Parent
  12. objectiveGui.Objective.Text = "Current Objective: Kill " .. amount .. " more people"
  13. counter.Changed:connect(function()
  14. if lastCount < counter.Value then
  15. objectiveGui.Objective.Text = "Current Objective: Kill " .. amount - counter.Value .. " more people"
  16. lastCount = counter.Value
  17. if lastCount == amount then
  18. local passGui = game.ReplicatedStorage.Guis.MissionPassed:clone()
  19. passGui.Reward.Value = 100 * amount
  20. passGui.Parent = player.PlayerGui
  21. passGui.PassScript.Disabled = false
  22. script:Destroy()
  23. end
  24. end
  25. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement