Facebook
From emi#5440, 3 Years ago, written in Lua.
Embed
Download Paste or View Raw
Hits: 129
  1. local QuestManager = {}
  2. local CurrencyManager = require(game.ReplicatedStorage.Scripts:WaitForChild("CurrencyManager"))
  3. local ds2 = require(game:GetService("ReplicatedStorage").Scripts.DataStore2.MainModule)
  4. local makePopupEvent = game.ReplicatedStorage.Events.MakePopup
  5. local Configuration = require(game:GetService("ReplicatedStorage").Configuration)
  6. local XPManager = require(game:GetService("ReplicatedStorage").Scripts.XPManager)
  7.  
  8. local Quests = {
  9.         Quest1 = {     
  10.                 ["Name"] = "Survive Easy",
  11.                 ["Instantiate"] = function(player)
  12.                         QuestManager.UpdateText(player,"Quest1",0,1)
  13.                         QuestManager.CheckIfCompletedQuest(player,"Quest1",1)
  14.                 end,
  15.                 ["UpdateProgressBar"] = function(state)
  16.                         if state then
  17.                                 return 1
  18.                         else
  19.                                 return 0
  20.                         end
  21.                 end,
  22.                 ["Requirments"] = {
  23.                         Requirment1 = function(player,alivePlayers,map,difficultyValue)
  24.                                 if difficultyValue == "Easy" then
  25.                                         for i,v in pairs(alivePlayers) do
  26.                                                 if v == player then
  27.                                                         QuestManager.UpdateText(player,"Quest1",1,1)
  28.                                                         return true
  29.                                                 end
  30.                                         end
  31.                                 end
  32.                                 return false
  33.                         end
  34.                 },
  35.                 ["Rewards"] = {["Coin"] = 50,["XP"] = 25},
  36.                 ["RewardPlayer"] = function(player)
  37.                         QuestManager.CompleteQuest(player,"Quest1",1)
  38.                         print(player.Name .. " Completed 'Survive Easy'")
  39.                         player.Quests.Quest1.Value = false
  40.                         CurrencyManager.GiveCoins(player,50)
  41.                         XPManager.GiveXP(player,25)
  42.                 end
  43.         },
  44.        
  45.         Quest2 = {     
  46.                 ["Name"] = "Survive Medium",
  47.                 ["Instantiate"] = function(player)
  48.                         QuestManager.UpdateText(player,"Quest2",0,1)
  49.                         QuestManager.CheckIfCompletedQuest(player,"Quest2",1)
  50.                 end,
  51.                 ["UpdateProgressBar"] = function(state)
  52.                         if state then
  53.                                 return 1
  54.                         else
  55.                                 return 0
  56.                         end
  57.                 end,
  58.                 ["Requirments"] = {
  59.                         Requirment1 = function(player,alivePlayers,map,difficultyValue)
  60.                                 if difficultyValue == "Medium" then
  61.                                         for i,v in pairs(alivePlayers) do
  62.                                                 if v == player then
  63.                                                         QuestManager.UpdateText(player,"Quest2",1,1)
  64.                                                         return true
  65.                                                 end
  66.                                         end
  67.                                 end
  68.                                 return false
  69.                         end
  70.                 },
  71.                 ["Rewards"] = {["Coin"] = 100,["XP"] = 30},
  72.                 ["RewardPlayer"] = function(player)
  73.                         QuestManager.CompleteQuest(player,"Quest2",1)
  74.                         print(player.Name .. " Completed 'Survive Medium'")
  75.                         player.Quests.Quest2.Value = false
  76.                         CurrencyManager.GiveCoins(player,100)
  77.                         XPManager.GiveXP(player,30)
  78.                 end
  79.         },
  80.        
  81.         Quest3 = {     
  82.                 ["Name"] = "Survive Hard",
  83.                 ["Instantiate"] = function(player)
  84.                         QuestManager.UpdateText(player,"Quest3",0,1)
  85.                         QuestManager.CheckIfCompletedQuest(player,"Quest3",1)
  86.                 end,
  87.                 ["UpdateProgressBar"] = function(state)
  88.                         if state then
  89.                                 return 1
  90.                         else
  91.                                 return 0
  92.                         end
  93.                 end,
  94.                 ["Requirments"] = {
  95.                         Requirment1 = function(player,alivePlayers,map,difficultyValue)
  96.                                 if difficultyValue == "Hard" then
  97.                                         for i,v in pairs(alivePlayers) do
  98.                                                 if v == player then
  99.                                                         QuestManager.UpdateText(player,"Quest3",1,1)
  100.                                                         return true
  101.                                                 end
  102.                                         end
  103.                                 end
  104.                                 return false
  105.                         end
  106.                 },
  107.                 ["Rewards"] = {["Coin"] = 150,["XP"] = 40},
  108.                 ["RewardPlayer"] = function(player)
  109.                         QuestManager.CompleteQuest(player,"Quest3",1)
  110.                         print(player.Name .. " Completed 'Survive Hard'")
  111.                         player.Quests.Quest3.Value = false
  112.                         CurrencyManager.GiveCoins(player,150)
  113.                         XPManager.GiveXP(player,40)
  114.                 end
  115.         },
  116.        
  117.         Quest4 = {     
  118.                 ["Name"] = "Survive Any Difficulty",
  119.                 ["Instantiate"] = function(player)
  120.                         QuestManager.UpdateText(player,"Quest4",0,1)
  121.                         QuestManager.CheckIfCompletedQuest(player,"Quest4",1)
  122.                  end,
  123.                 ["UpdateProgressBar"] = function(state)
  124.                         if state then
  125.                                 return 1
  126.                         else
  127.                                 return 0
  128.                         end
  129.                 end,
  130.                 ["Requirments"] = {
  131.                         Requirment1 = function(player,alivePlayers,map)
  132.                                 for i,v in pairs(alivePlayers) do
  133.                                         if v == player then
  134.                                                 QuestManager.UpdateText(player,"Quest4",1,1)
  135.                                                 return true
  136.                                         end
  137.                                 end
  138.                                 return false
  139.                         end
  140.                 },
  141.                 ["Rewards"] = {["Coin"] = 100,["XP"] = 30},
  142.                 ["RewardPlayer"] = function(player)
  143.                         QuestManager.CompleteQuest(player,"Quest4",1)
  144.                         print(player.Name .. " Completed 'Survive Any Difficulty'")
  145.                         player.Quests.Quest4.Value = false
  146.                         CurrencyManager.GiveCoins(player,100)
  147.                         XPManager.GiveXP(player,30)
  148.                 end
  149.         },
  150.        
  151.         Quest5 = {     
  152.                 ["Name"] = "Survive 5 Times",
  153.                 ["Instantiate"] = function(player)
  154.                         if not ds2("neededSurvivals5",player):Get() then
  155.                                 local playerCurrentSurvivals = ds2("survivals",player):Get(0)
  156.                                 local playerNeededSurvivals = playerCurrentSurvivals+5
  157.                                 ds2("neededSurvivals5",player):Set(playerNeededSurvivals)
  158.                         end
  159.                         QuestManager.UpdateText(player,"Quest5",5-(ds2("neededSurvivals5",player):Get(0)-ds2("survivals",player):Get(0)),5)
  160.                         QuestManager.CheckIfCompletedQuest(player,"Quest5",5)
  161.                 end ,
  162.                 ["UpdateProgressBar"] = function(player)
  163.                        
  164.                 end,
  165.                 ["Requirments"] = {
  166.                         Requirment1 = function(player)
  167.                                 QuestManager.UpdateText(player,"Quest5",5-(ds2("neededSurvivals5",player):Get(0)-ds2("survivals",player):Get(0)),5)
  168.                                 if ds2("neededSurvivals5",player):Get(0) <= ds2("survivals",player):Get(0) then
  169.                                         return true
  170.                                 end
  171.                                 return false
  172.                         end
  173.                 },
  174.                 ["Rewards"] = {["Coin"] = 100,["XP"] = 30},
  175.                 ["RewardPlayer"] = function(player)
  176.                         QuestManager.CompleteQuest(player,"Quest5",5)
  177.                         player.Quests.Quest5.Value = false
  178.                         print(player.Name .. " Completed 'Survive 5 Times'")
  179.                         ds2("neededSurvivals5",player):Set(nil)
  180.                         CurrencyManager.GiveCoins(player,100)
  181.                         XPManager.GiveXP(player,30)
  182.                 end
  183.         },
  184.        
  185.         Quest6 = {     
  186.                 ["Name"] = "Survive 10 Times",
  187.                 ["Instantiate"] = function(player)
  188.                         if not ds2("neededSurvivals10",player):Get() then
  189.                                 local playerCurrentSurvivals = ds2("survivals",player):Get(0)
  190.                                 local playerNeededSurvivals = playerCurrentSurvivals+10
  191.                                 ds2("neededSurvivals10",player):Set(playerNeededSurvivals)
  192.                         end
  193.                         QuestManager.UpdateText(player,"Quest6",10-(ds2("neededSurvivals10",player):Get(0)-ds2("survivals",player):Get(0)),10)
  194.                         QuestManager.CheckIfCompletedQuest(player,"Quest6",10)
  195.                 end ,
  196.                 ["UpdateProgressBar"] = function(player)
  197.                        
  198.                 end,
  199.                 ["Requirments"] = {
  200.                         Requirment1 = function(player)
  201.                                 QuestManager.UpdateText(player,"Quest6",10-(ds2("neededSurvivals10",player):Get(0)-ds2("survivals",player):Get(0)),10)
  202.                                 if ds2("neededSurvivals10",player):Get(0) <= ds2("survivals",player):Get(0) then
  203.                                         return true
  204.                                 end
  205.                                 return false
  206.                         end
  207.                 },
  208.                 ["Rewards"] = {["Coin"] = 150,["XP"] = 50},
  209.                 ["RewardPlayer"] = function(player)
  210.                         QuestManager.CompleteQuest(player,"Quest6",10)
  211.                         player.Quests.Quest6.Value = false
  212.                         print(player.Name .. " Completed 'Survive 10 Times'")
  213.                         ds2("neededSurvivals10",player):Set(nil)
  214.                         CurrencyManager.GiveCoins(player,150)
  215.                         XPManager.GiveXP(player,50)
  216.                 end
  217.         },
  218.        
  219.         Quest7 = {     
  220.                 ["Name"] = "Survive Easy,Medium and Hard",
  221.                 ["Instantiate"] = function(player)
  222.                         if not ds2("survivedEMH",player):Get() then
  223.                                 ds2("survivedEMH",player):Set({["Easy"]=false,["Medium"]=false,["Hard"]=false})
  224.                         end
  225.                        
  226.                         local count = 0
  227.                         for difficulty,value in pairs(ds2("survivedEMH",player):Get()) do
  228.                                 if value then
  229.                                         count = count + 1
  230.                                 end
  231.                         end
  232.                         QuestManager.UpdateText(player,"Quest7",count,3)
  233.                         QuestManager.CheckIfCompletedQuest(player,"Quest7",3)
  234.                 end ,
  235.                 ["Requirments"] = {
  236.                         Requirment1 = function(player,alivePlayers,map,difficultyValue)
  237.                                 for i,v in pairs(alivePlayers) do
  238.                                         if v == player then
  239.                                                 local survivedEMH = ds2("survivedEMH",player):Get()
  240.                                                 survivedEMH[difficultyValue] = true
  241.                                                 ds2("survivedEMH",player):Set(survivedEMH)
  242.                                                 local count = 0
  243.                                                 for difficulty,value in pairs(survivedEMH) do
  244.                                                         if value then
  245.                                                                 count = count + 1
  246.                                                         end
  247.                                                 end
  248.                                                 QuestManager.UpdateText(player,"Quest7",count,3)
  249.                                                 if survivedEMH.Easy == true and survivedEMH.Medium == true and survivedEMH.Hard == true then
  250.                                                         return true
  251.                                                 end
  252.                                                 break
  253.                                         end    
  254.                                 end
  255.                                 return false
  256.                         end
  257.                 },
  258.                 ["Rewards"] = {["Coin"] = 150,["XP"] = 50},
  259.                 ["RewardPlayer"] = function(player)
  260.                         QuestManager.CompleteQuest(player,"Quest7",3)
  261.                         player.Quests.Quest7.Value = false
  262.                         print(player.Name .. " Completed 'Survive Easy,Medium and Hard'")
  263.                         ds2("survivedEMH",player):Set(nil)
  264.                         CurrencyManager.GiveCoins(player,150)
  265.                         XPManager.GiveXP(player,50)
  266.                 end
  267.         },
  268.        
  269.         Quest8 = {     
  270.                 ["Name"] = "Survive Easy,Medium and Hard without dying!",
  271.                
  272.                 ["Instantiate"] = function(player)
  273.                         if not ds2("survivedEMHW",player):Get() then
  274.                                 ds2("survivedEMHW",player):Set({["Easy"]=false,["Medium"]=false,["Hard"]=false})
  275.                         end
  276.                        
  277.                         local count = 0                
  278.                         for difficulty,value in pairs(ds2("survivedEMHW",player):Get()) do
  279.                                 if value then
  280.                                         count = count + 1
  281.                                 end
  282.                         end
  283.                        
  284.                         QuestManager.UpdateText(player,"Quest8",count,3)
  285.                         QuestManager.CheckIfCompletedQuest(player,"Quest8",3)
  286.                 end ,
  287.                
  288.                 ["Requirments"] = {
  289.                         Requirment1 = function(player,alivePlayers,deadPlayers,map,difficultyValue)
  290.                                 local count = 0
  291.                                
  292.                                 for i,v in pairs(deadPlayers) do
  293.                                         if v == player then
  294.                                                 ds2("survivedEMHW",player):Set({["Easy"]=false,["Medium"]=false,["Hard"]=false})
  295.                                                 count = 0
  296.                                                
  297.                                                 QuestManager.UpdateText(player,"Quest8",0,3)
  298.                                                 return false
  299.                                         end
  300.                                 end
  301.                                
  302.                                 for i,v in pairs(alivePlayers) do
  303.                                         if v == player then
  304.                                                 local survivedEMHW = ds2("survivedEMHW",player):Get()
  305.                                                 survivedEMHW[difficultyValue] = true
  306.                                                 ds2("survivedEMHW",player):Set(survivedEMHW)
  307.                                                
  308.                                                 for difficulty,value in pairs(survivedEMHW) do
  309.                                                         if value then
  310.                                                                 count = count + 1
  311.                                                         end
  312.                                                 end
  313.                                                 QuestManager.UpdateText(player,"Quest8",count,3)
  314.                                                 if survivedEMHW.Easy == true and survivedEMHW.Medium == true and survivedEMHW.Hard == true then
  315.                                                         return true
  316.                                                 end
  317.                                                 break
  318.                                         end    
  319.                                 end
  320.                                 return false
  321.                         end
  322.                 },
  323.                
  324.                 ["Rewards"] = {["Coin"] = 200,["XP"] = 75},
  325.                
  326.                 ["RewardPlayer"] = function(player)
  327.                         QuestManager.CompleteQuest(player,"Quest8",3)
  328.                         player.Quests.Quest8.Value = false
  329.                         print(player.Name .. " Completed 'Survive Easy,Medium and Hard without dying!'")
  330.                         ds2("survivedEMHW",player):Set(nil)
  331.                         CurrencyManager.GiveCoins(player,200)
  332.                         XPManager.GiveXP(player,75)
  333.                 end
  334.         },
  335.        
  336.         Quest9 = {     
  337.                 ["Name"] = "Play For an Hour",
  338.                
  339.                 ["Instantiate"] = function(player)
  340.                         if not ds2("oneHourCoin",player):Get() then
  341.                                 ds2("oneHourCoin",player):Set(0)
  342.                         end
  343.                         QuestManager.UpdateText(player,"Quest9",0,60)
  344.                         QuestManager.CheckIfCompletedQuest(player,"Quest9",60)
  345.                 end  ,
  346.                
  347.                 ["Requirments"] = {
  348.                         Requirment1 = function(player)
  349.                                 ds2("oneHourCoin",player):Get(0)
  350.                                 ds2("oneHourCoin",player):Increment(1)
  351.                                 local totalTime = ds2("oneHourCoin",player):Get()
  352.                                 QuestManager.UpdateText(player,"Quest9",math.ceil(totalTime/60),60)
  353.                                 if totalTime >= 3600 then
  354.                                         return true
  355.                                 end
  356.                                 return false
  357.                         end
  358.                 },
  359.                
  360.                 ["Rewards"] = {["Coin"] = 200,["XP"] = 75},
  361.                
  362.                 ["RewardPlayer"] = function(player)
  363.                         QuestManager.CompleteQuest(player,"Quest9",60)
  364.                         player.Quests.Quest9.Value = false
  365.                         print(player.Name .. " Completed 'Play for a Hour'")
  366.                         ds2("oneHourCoin",player):Set(nil)
  367.                         CurrencyManager.GiveCoins(player,200)
  368.                         XPManager.GiveXP(player,75)
  369.                 end
  370.         },
  371.        
  372.         Quest10 = {    
  373.                 ["Name"] = "Play For Two Hours",
  374.                
  375.                 ["Instantiate"] = function(player)
  376.                         if not ds2("twoHourCoin",player):Get() then
  377.                                 ds2("twoHourCoin",player):Set(0)
  378.                         end
  379.                         QuestManager.UpdateText(player,"Quest10",0,120)
  380.                         QuestManager.CheckIfCompletedQuest(player,"Quest10",120)
  381.                 end  ,
  382.                
  383.                 ["Requirments"] = {
  384.                         Requirment1 = function(player)
  385.                                 ds2("twoHourCoin",player):Get(0)
  386.                                 ds2("twoHourCoin",player):Increment(1)
  387.                                 local totalTime = ds2("twoHourCoin",player):Get()
  388.                                 QuestManager.UpdateText(player,"Quest10",math.ceil(totalTime/60),120)
  389.                                 if totalTime >= 7200 then
  390.                                         return true
  391.                                 end
  392.                                 return false
  393.                         end
  394.                 },
  395.                
  396.                 ["Rewards"] = {["Coin"] = 250,["XP"] = 100},
  397.                
  398.                 ["RewardPlayer"] = function(player)
  399.                         QuestManager.CompleteQuest(player,"Quest10",120)
  400.                         player.Quests.Quest10.Value = false
  401.                         print(player.Name .. " Completed 'Play For Two Hours'")
  402.                         ds2("twoHourCoin",player):Set(nil)
  403.                         CurrencyManager.GiveCoins(player,250)
  404.                         XPManager.GiveXP(player,100)
  405.                 end
  406.         }
  407. }
  408.  
  409. local GemQuests = {
  410.         Quest100 = {   
  411.                 ["Name"] = "Play For Two Hours",
  412.                
  413.                 ["Instantiate"] = function(player)
  414.                         if not ds2("twoHourGem",player):Get() then
  415.                                 ds2("twoHourGem",player):Set(0)
  416.                         end
  417.                         QuestManager.UpdateText(player,"Quest100",0,120)
  418.                         QuestManager.CheckIfCompletedQuest(player,"Quest100",120)
  419.                 end  ,
  420.                
  421.                 ["Requirments"] = {
  422.                         Requirment1 = function(player)
  423.                                 ds2("twoHourGem",player):Get(0)
  424.                                 ds2("twoHourGem",player):Increment(1)
  425.                                 local totalTime = ds2("twoHourGem",player):Get()
  426.                                 QuestManager.UpdateText(player,"Quest100",math.ceil(totalTime/60),120)
  427.                                 if totalTime >= 7200 then
  428.                                         return true
  429.                                 end
  430.                                 return false
  431.                         end
  432.                 },
  433.                
  434.                 ["Rewards"] = {["Gem"] = 10,["XP"] = 100},
  435.                
  436.                 ["RewardPlayer"] = function(player)
  437.                         QuestManager.CompleteQuest(player,"Quest100",120)
  438.                         player.Quests.Quest100.Value = false
  439.                         print(player.Name .. " Completed 'Play For Two Hours'")
  440.                         ds2("twoHourGem",player):Set(nil)
  441.                         CurrencyManager.GiveGems(player,10)
  442.                         XPManager.GiveXP(player,100)
  443.                 end
  444.         },
  445.        
  446.         Quest101 = {   
  447.                 ["Name"] = "Play For an Hour",
  448.                
  449.                 ["Instantiate"] = function(player)
  450.                         if not ds2("oneHourGem",player):Get() then
  451.                                 ds2("oneHourGem",player):Set(0)
  452.                         end
  453.                         QuestManager.UpdateText(player,"Quest101",0,60)
  454.                         QuestManager.CheckIfCompletedQuest(player,"Quest101",60)
  455.                 end  ,
  456.                
  457.                 ["Requirments"] = {
  458.                         Requirment1 = function(player)
  459.                                 ds2("oneHourGem",player):Get(0)
  460.                                 ds2("oneHourGem",player):Increment(1)
  461.                                 local totalTime = ds2("oneHourGem",player):Get()
  462.                                 QuestManager.UpdateText(player,"Quest101",math.ceil(totalTime/60),60)
  463.                                 if totalTime >= 3600 then
  464.                                         return true
  465.                                 end
  466.                                 return false
  467.                         end
  468.                 },
  469.                
  470.                 ["Rewards"] = {["Gem"] = 5,["XP"] = 75},
  471.                
  472.                 ["RewardPlayer"] = function(player)
  473.                         QuestManager.CompleteQuest(player,"Quest101",60)
  474.                         player.Quests.Quest101.Value = false
  475.                         print(player.Name .. " Completed 'Play For an Hour'")
  476.                         ds2("oneHourGem",player):Set(nil)
  477.                         CurrencyManager.GiveGems(player,5)
  478.                         XPManager.GiveXP(player,75)
  479.                 end
  480.         },
  481.  
  482.         Quest102 = {   
  483.                 ["Name"] = "Survive 10 Times",
  484.                 ["Instantiate"] = function(player)
  485.                         if not ds2("neededSurvivals10Gems",player):Get() then
  486.                                 local playerCurrentSurvivals = ds2("survivals",player):Get(0)
  487.                                 local playerNeededSurvivals = playerCurrentSurvivals+10
  488.                                 ds2("neededSurvivals10Gems",player):Set(playerNeededSurvivals)
  489.                         end
  490.                         QuestManager.UpdateText(player,"Quest102",10-(ds2("neededSurvivals10Gems",player):Get(0)-ds2("survivals",player):Get(0)),10)
  491.                         QuestManager.CheckIfCompletedQuest(player,"Quest102",10)
  492.                 end ,
  493.                 ["UpdateProgressBar"] = function(player)
  494.                        
  495.                 end,
  496.                 ["Requirments"] = {
  497.                         Requirment1 = function(player)
  498.                                 QuestManager.UpdateText(player,"Quest102",10-(ds2("neededSurvivals10Gems",player):Get(0)-ds2("survivals",player):Get(0)),10)
  499.                                 if ds2("neededSurvivals10Gems",player):Get(0) <= ds2("survivals",player):Get(0) then
  500.                                         return true
  501.                                 end
  502.                                 return false
  503.                         end
  504.                 },
  505.                 ["Rewards"] = {["Gem"] = 5,["XP"] = 40},
  506.                 ["RewardPlayer"] = function(player)
  507.                         QuestManager.CompleteQuest(player,"Quest102",10)
  508.                         player.Quests.Quest102.Value = false
  509.                         print(player.Name .. " Completed 'Survive 10 Times'")
  510.                         ds2("neededSurvivals10Gems",player):Set(nil)
  511.                         CurrencyManager.GiveGems(player,5)
  512.                         XPManager.GiveXP(player,40)
  513.                 end
  514.         },
  515.        
  516.         Quest103 = {   
  517.                 ["Name"] = "Survive 25 Times",
  518.                
  519.                 ["Instantiate"] = function(player)
  520.                         if not ds2("neededSurvivals25Gems",player):Get() then
  521.                                 local playerCurrentSurvivals = ds2("survivals",player):Get(0)
  522.                                 local playerNeededSurvivals = playerCurrentSurvivals+25
  523.                                 ds2("neededSurvivals25Gems",player):Set(playerNeededSurvivals)
  524.                         end
  525.                         QuestManager.UpdateText(player,"Quest103",25-(ds2("neededSurvivals25Gems",player):Get(0)-ds2("survivals",player):Get(0)),25)
  526.                         QuestManager.CheckIfCompletedQuest(player,"Quest103",25)
  527.                 end ,
  528.                
  529.                 ["UpdateProgressBar"] = function(player)
  530.                        
  531.                 end,
  532.                
  533.                 ["Requirments"] = {
  534.                         Requirment1 = function(player)
  535.                                 QuestManager.UpdateText(player,"Quest103",25-(ds2("neededSurvivals25Gems",player):Get(0)-ds2("survivals",player):Get(0)),25)
  536.                                 if ds2("neededSurvivals25Gems",player):Get(0) <= ds2("survivals",player):Get(0) then
  537.                                         return true
  538.                                 end
  539.                                 return false
  540.                         end
  541.                 },
  542.                
  543.                 ["Rewards"] = {["Gem"] = 10,["XP"] = 75},
  544.                
  545.                 ["RewardPlayer"] = function(player)
  546.                         QuestManager.CompleteQuest(player,"Quest103",25)
  547.                         player.Quests.Quest103.Value = false
  548.                         print(player.Name .. " Completed 'Survive 10 Times'")
  549.                         ds2("neededSurvivals25Gems",player):Set(nil)
  550.                         CurrencyManager.GiveGems(player,10)
  551.                         XPManager.GiveXP(player,75)
  552.                 end
  553.         },
  554.        
  555.         Quest104 = {   
  556.                 ["Name"] = "Survive Hard",
  557.                
  558.                 ["Instantiate"] = function(player)
  559.                         QuestManager.UpdateText(player,"Quest104",0,1)
  560.                         QuestManager.CheckIfCompletedQuest(player,"Quest104",1)
  561.                 end,
  562.                
  563.                 ["Requirments"] = {
  564.                         Requirment1 = function(player,alivePlayers,map,difficultyValue)
  565.                                 if difficultyValue == "Hard" then
  566.                                         for i,v in pairs(alivePlayers) do
  567.                                                 if v == player then
  568.                                                         QuestManager.UpdateText(player,"Quest104",1,1)
  569.                                                         return true
  570.                                                 end
  571.                                         end
  572.                                 end
  573.                                 return false
  574.                         end
  575.                 },
  576.                 ["Rewards"] = {["Gem"] = 5,["XP"] = 25},
  577.                
  578.                 ["RewardPlayer"] = function(player)
  579.                         QuestManager.CompleteQuest(player,"Quest104",1)
  580.                         print(player.Name .. " Completed 'Survive Hard'")
  581.                         player.Quests.Quest3.Value = false
  582.                         CurrencyManager.GiveGems(player,5)
  583.                         XPManager.GiveXP(player,25)
  584.                 end
  585.         },
  586.        
  587.         Quest105 = {   
  588.                 ["Name"] = "Survive Easy,Medium and Hard",
  589.                
  590.                 ["Instantiate"] = function(player)
  591.                         if not ds2("survivedEMHGem",player):Get() then
  592.                                 ds2("survivedEMHGem",player):Set({["Easy"]=false,["Medium"]=false,["Hard"]=false})
  593.                         end
  594.                        
  595.                         local count = 0
  596.                         for difficulty,value in pairs(ds2("survivedEMHGem",player):Get()) do
  597.                                 if value then
  598.                                         count = count + 1
  599.                                 end
  600.                         end
  601.                         QuestManager.UpdateText(player,"Quest105",count,3)
  602.                         QuestManager.CheckIfCompletedQuest(player,"Quest105",3)
  603.                 end ,
  604.                
  605.                 ["Requirments"] = {
  606.                         Requirment1 = function(player,alivePlayers,map,difficultyValue)
  607.                                 for i,v in pairs(alivePlayers) do
  608.                                         if v == player then
  609.                                                 local survivedEMHGem = ds2("survivedEMHGem",player):Get()
  610.                                                 survivedEMHGem[difficultyValue] = true
  611.                                                 ds2("survivedEMHGem",player):Set(survivedEMHGem)
  612.                                                 local count = 0
  613.                                                 for difficulty,value in pairs(survivedEMHGem) do
  614.                                                         if value then
  615.                                                                 count = count + 1
  616.                                                         end
  617.                                                 end
  618.                                                 QuestManager.UpdateText(player,"Quest105",count,3)
  619.                                                 if survivedEMHGem.Easy == true and survivedEMHGem.Medium == true and survivedEMHGem.Hard == true then
  620.                                                         return true
  621.                                                 end
  622.                                                 break
  623.                                         end    
  624.                                 end
  625.                                 return false
  626.                         end
  627.                 },
  628.                
  629.                 ["Rewards"] = {["Gem"] = 5,["XP"] = 50},
  630.                
  631.                 ["RewardPlayer"] = function(player)
  632.                         QuestManager.CompleteQuest(player,"Quest105",3)
  633.                         player.Quests.Quest105.Value = false
  634.                         print(player.Name .. " Completed 'Survive Easy,Medium and Hard'")
  635.                         ds2("survivedEMHGem",player):Set(nil)
  636.                         CurrencyManager.GiveGems(player,5)
  637.                         XPManager.GiveXP(player,50)
  638.                 end
  639.         },
  640. }
  641. ds2.Combine(Configuration.GetDatastoreName(),"neededSurvivals5","neededSurvivals10","survivedEMH","survivedEMHW","oneHourCoin"
  642.                                                                                         ,"twoHourCoin","playercompletedquests","twoHourGem","oneHourGem","neededSurvivals10Gems","neededSurvivals25Gems","survivedEMHGem")
  643.  
  644. function QuestManager.Setup(player)
  645.         local questsFolder = Instance.new("Folder",player)
  646.         questsFolder.Name = "Quests"
  647.        
  648.         local Quest1 = Instance.new("BoolValue",questsFolder)
  649.         Quest1.Name = "Quest1"
  650.         Quest1.Value = false
  651.        
  652.         local Quest2 = Instance.new("BoolValue",questsFolder)
  653.         Quest2.Name = "Quest2"
  654.         Quest2.Value = false
  655.        
  656.         local Quest3 = Instance.new("BoolValue",questsFolder)
  657.         Quest3.Name = "Quest3"
  658.         Quest3.Value = false
  659.        
  660.         local Quest4 = Instance.new("BoolValue",questsFolder)
  661.         Quest4.Name = "Quest4"
  662.         Quest4.Value = false
  663.        
  664.         local Quest5 = Instance.new("BoolValue",questsFolder)
  665.         Quest5.Name = "Quest5"
  666.         Quest5.Value = false
  667.         --Quests.Quest5.Instantiate(player)
  668.        
  669.         local Quest6 = Instance.new("BoolValue",questsFolder)
  670.         Quest6.Name = "Quest6"
  671.         Quest6.Value = false
  672.         --Quests.Quest6.Instantiate(player)
  673.  
  674.         local Quest7 = Instance.new("BoolValue",questsFolder)
  675.         Quest7.Name = "Quest7"
  676.         Quest7.Value = false
  677.         --Quests.Quest7.Instantiate(player)
  678.        
  679.         local Quest8 = Instance.new("BoolValue",questsFolder)
  680.         Quest8.Name = "Quest8"
  681.         Quest8.Value = false
  682.         --Quests.Quest8.Instantiate(player)
  683.        
  684.         local Quest9 = Instance.new("BoolValue",questsFolder)
  685.         Quest9.Name = "Quest9"
  686.         Quest9.Value = false
  687.        
  688.         local Quest10 = Instance.new("BoolValue",questsFolder)
  689.         Quest10.Name = "Quest10"
  690.         Quest10.Value = false
  691.         --Quests.Quest9.Instantiate(player)
  692.        
  693.         local Quest100 = Instance.new("BoolValue",questsFolder)
  694.         Quest100.Name = "Quest100"
  695.         Quest100.Value = false
  696.        
  697.         local Quest101 = Instance.new("BoolValue",questsFolder)
  698.         Quest101.Name = "Quest101"
  699.         Quest101.Value = false
  700.        
  701.         local Quest102 = Instance.new("BoolValue",questsFolder)
  702.         Quest102.Name = "Quest102"
  703.         Quest102.Value = false
  704.  
  705.         local Quest103 = Instance.new("BoolValue",questsFolder)
  706.         Quest103.Name = "Quest103"
  707.         Quest103.Value = false
  708.        
  709.         local Quest104 = Instance.new("BoolValue",questsFolder)
  710.         Quest104.Name = "Quest104"
  711.         Quest104.Value = false
  712.        
  713.         local Quest105 = Instance.new("BoolValue",questsFolder)
  714.         Quest105.Name = "Quest105"
  715.         Quest105.Value = false
  716. end
  717.  
  718. function QuestManager.SelectRandomQuests(questScript,player)
  719.         local questKeys = {}
  720.         local gemQuestkeys = {}
  721.         local questSlots = {questScript.Parent.QuestSlot1,questScript.Parent.QuestSlot2,questScript.Parent.QuestSlot3,questScript.Parent.QuestSlot4,questScript.Parent.QuestSlot5,questScript.Parent.QuestSlot6}
  722.        
  723.         for quest, _ in pairs(Quests) do
  724.                 table.insert(questKeys, quest)
  725.         end
  726.        
  727.         for gemQuest, _ in pairs(GemQuests) do
  728.                 table.insert(gemQuestkeys,gemQuest)
  729.         end
  730.        
  731.         local selectedQuests = {}
  732.         for i=1,4 do
  733.                 local randomQuest = questKeys[math.random(#questKeys)]
  734.                 for t,v in pairs(questKeys) do
  735.                         if v == randomQuest then
  736.                                 questSlots[i].QuestValue.Value = randomQuest
  737.                                 table.insert(selectedQuests,randomQuest)
  738.                                 Quests[randomQuest].Instantiate(player)
  739.                                 player.Quests[randomQuest].Value = true
  740.                                 questSlots[i].CoinImage.CoinAmount.Text = Quests[randomQuest].Rewards.Coin
  741.                                 questSlots[i].QuestName.Text = Quests[randomQuest].Name
  742.                                 questSlots[i].XpImage.XPAmount.Text = Quests[randomQuest].Rewards.XP
  743.                                 table.remove(questKeys,t)
  744.                                 break
  745.                         end
  746.                 end
  747.         end
  748.        
  749.         for i=5,6 do
  750.                 local randomQuest = gemQuestkeys[math.random(#gemQuestkeys)]
  751.                 for t,v in pairs(gemQuestkeys) do
  752.                         if v == randomQuest then
  753.                                 questSlots[i].QuestValue.Value = randomQuest
  754.                                 table.insert(selectedQuests,randomQuest)
  755.                                 player.Quests[randomQuest].Value = true
  756.                                 GemQuests[randomQuest].Instantiate(player)
  757.                                 questSlots[i].CoinImage.CoinAmount.Text = GemQuests[randomQuest].Rewards.Gem
  758.                                 questSlots[i].QuestName.Text = GemQuests[randomQuest].Name
  759.                                 questSlots[i].XpImage.XPAmount.Text = GemQuests[randomQuest].Rewards.XP
  760.                                 table.remove(gemQuestkeys,t)
  761.                                 break
  762.                         end
  763.                 end
  764.         end
  765.         ds2("playerquests",player):Set(selectedQuests)
  766.         return selectedQuests
  767. end
  768.  
  769. function QuestManager.GetQuests()
  770.         return Quests, GemQuests
  771. end
  772.  
  773. --ds2.Combine(Configuration.GetDatastoreName(),"neededSurvivals5","neededSurvivals10","survivedEMH","survivedEMHW","oneHourCoin"
  774. --                                                                                      ,"twoHourCoin","playercompletedquests","twoHourGem","oneHourGem","neededSurvivals10Gems")
  775. function QuestManager.SelectNewQuests(scriptName,player)
  776.         ds2("neededSurvivals5",player):Set()
  777.         ds2("neededSurvivals10",player):Set()
  778.         ds2("survivedEMH",player):Set({["Easy"]=false,["Medium"]=false,["Hard"]=false})
  779.         ds2("survivedEMHW",player):Set({["Easy"]=false,["Medium"]=false,["Hard"]=false})
  780.         ds2("oneHourCoin",player):Set()
  781.         ds2("twoHourCoin",player):Set()
  782.         ds2("playercompletedquests",player):Set()
  783.         ds2("playerquests",player):Set()
  784.        
  785.         ds2("twoHourGem",player):Set()
  786.         ds2("neededSurvivals10Gems",player):Set()
  787.         ds2("oneHourGem",player):Set()
  788.         ds2("neededSurvivals25Gems",player):Set()
  789.         ds2("survivedEMHGem",player):Set({["Easy"]=false,["Medium"]=false,["Hard"]=false})
  790.        
  791.         for i, quest in pairs(player.Quests:GetChildren()) do
  792.                 quest.Value = false
  793.         end
  794.        
  795.         local playerQuestsGui = player.PlayerGui:WaitForChild("QuestGui").Frame.Quests
  796.         local questFinishedSlots = {{playerQuestsGui.QuestSlot1Finish,playerQuestsGui.d1Finish},{playerQuestsGui.QuestSlot2Finish,playerQuestsGui.d2Finish},{playerQuestsGui.QuestSlot3Finish,playerQuestsGui.d3Finish},
  797.         {playerQuestsGui.QuestSlot4Finish,playerQuestsGui.d4Finish},{playerQuestsGui.QuestSlot5Finish,playerQuestsGui.d5Finish},{playerQuestsGui.QuestSlot6Finish,playerQuestsGui.d6Finish}}
  798.         for i, questFinishedSlot in pairs(questFinishedSlots) do
  799.                 questFinishedSlot[1].Visible = false
  800.                 questFinishedSlot[2].Visible = false
  801.         end
  802.        
  803.         return QuestManager.SelectRandomQuests(scriptName,player)
  804. end
  805.  
  806. function QuestManager.InstantiateQuests(questScript,player)
  807.         local playerQuests = ds2("playerquests",player):Get()
  808.         local questSlots = {questScript.Parent.QuestSlot1,questScript.Parent.QuestSlot2,questScript.Parent.QuestSlot3,questScript.Parent.QuestSlot4,questScript.Parent.QuestSlot5,questScript.Parent.QuestSlot6}
  809.        
  810.         for i=1,6 do
  811.                 player.Quests[playerQuests[i]].Value = true
  812.                 questSlots[i].QuestValue.Value = playerQuests[i]
  813.         end
  814.        
  815.         for i=1,6 do   
  816.                 if Quests[playerQuests[i]] then
  817.                         questSlots[i].CoinImage.CoinAmount.Text = Quests[playerQuests[i]].Rewards.Coin
  818.                         questSlots[i].QuestName.Text = Quests[playerQuests[i]].Name
  819.                         questSlots[i].XpImage.XPAmount.Text = Quests[playerQuests[i]].Rewards.XP
  820.                         Quests[playerQuests[i]].Instantiate(player)
  821.                 elseif GemQuests[playerQuests[i]] then
  822.                         questSlots[i].CoinImage.CoinAmount.Text = GemQuests[playerQuests[i]].Rewards.Gem
  823.                         questSlots[i].QuestName.Text = GemQuests[playerQuests[i]].Name
  824.                         questSlots[i].XpImage.XPAmount.Text = GemQuests[playerQuests[i]].Rewards.XP
  825.                         GemQuests[playerQuests[i]].Instantiate(player)
  826.                 end
  827.         end
  828. end
  829.  
  830. function QuestManager.CheckPlayerQuests(player)
  831.         if not ds2("playerquests",player):Get() then
  832.                 return false
  833.         else
  834.                 return true
  835.         end
  836. end
  837.  
  838. function QuestManager.CheckTimeQuests()
  839.         wait(5)
  840.         while true do
  841.                 wait(1)
  842.                 for i,player in pairs(game.Players:GetChildren()) do
  843.                         if player:WaitForChild("Quests").Quest9.Value then
  844.                                 if Quests.Quest9.Requirments.Requirment1(player) then
  845.                                         Quests.Quest9.RewardPlayer(player)
  846.                                 end
  847.                         end
  848.                         if player:WaitForChild("Quests").Quest10.Value then
  849.                                 if Quests.Quest10.Requirments.Requirment1(player) then
  850.                                         Quests.Quest10.RewardPlayer(player)
  851.                                 end
  852.                         end
  853.                         if player:WaitForChild("Quests").Quest100.Value then
  854.                                 if GemQuests.Quest100.Requirments.Requirment1(player) then
  855.                                         GemQuests.Quest100.RewardPlayer(player)
  856.                                 end
  857.                         end
  858.                         if player:WaitForChild("Quests").Quest101.Value then
  859.                                 if GemQuests.Quest101.Requirments.Requirment1(player) then
  860.                                         GemQuests.Quest101.RewardPlayer(player)
  861.                                 end
  862.                         end
  863.                 end
  864.         end
  865. end
  866.  
  867. function QuestManager.UpdateText(player,questName,value,desiredValue)
  868.         local playerQuestsGui = player.PlayerGui:WaitForChild("QuestGui").Frame.Quests
  869.         local questSlots = {playerQuestsGui.QuestSlot1,playerQuestsGui.QuestSlot2,playerQuestsGui.QuestSlot3,playerQuestsGui.QuestSlot4,playerQuestsGui.QuestSlot5,playerQuestsGui.QuestSlot6}
  870.        
  871.         for t,questSlot in pairs(questSlots) do
  872.                 if questSlot.QuestValue.Value == questName then
  873.                         questSlot.QuestProgress.Text = "["..value.."/"..desiredValue .."]"
  874.                         local newValue = 0.582* value/desiredValue
  875.                         if newValue >= 0.582 then
  876.                                 newValue = 0.582
  877.                         elseif newValue < 0 then
  878.                                 newValue = 0
  879.                         end
  880.                         questSlot.Loading.Size = UDim2.new(newValue,0,0.315,0)
  881.                         break
  882.                 end
  883.         end
  884. end
  885.  
  886. function QuestManager.CheckIfCompletedQuest(player,questValue,finishValue)
  887.         local playerQuestsGui = player.PlayerGui:WaitForChild("QuestGui").Frame.Quests
  888.         local questSlots = {playerQuestsGui.QuestSlot1,playerQuestsGui.QuestSlot2,playerQuestsGui.QuestSlot3,playerQuestsGui.QuestSlot4,playerQuestsGui.QuestSlot5,playerQuestsGui.QuestSlot6}
  889.         local questFinishedSlots = {{playerQuestsGui.QuestSlot1Finish,playerQuestsGui.d1Finish},{playerQuestsGui.QuestSlot2Finish,playerQuestsGui.d2Finish},{playerQuestsGui.QuestSlot3Finish,playerQuestsGui.d3Finish},
  890.         {playerQuestsGui.QuestSlot4Finish,playerQuestsGui.d4Finish},{playerQuestsGui.QuestSlot5Finish,playerQuestsGui.d5Finish},{playerQuestsGui.QuestSlot6Finish,playerQuestsGui.d6Finish}}
  891.        
  892.         local playerCompletedQuests = ds2("playercompletedquests",player):Get({})
  893.         if #playerCompletedQuests == 0 then return false end
  894.        
  895.         for i,questSlot in pairs(questSlots) do
  896.                 if questSlot:WaitForChild("QuestValue").Value == questValue then
  897.                         for t,completedQuest in pairs(playerCompletedQuests) do
  898.                                 if completedQuest == questValue then
  899.                                         questSlot:WaitForChild("QuestCompleted").Value = true
  900.                                         player:WaitForChild("Quests")[questValue].Value = false
  901.                                         questFinishedSlots[i][1].Visible = true
  902.                                         questFinishedSlots[i][2].Visible = true
  903.                                         QuestManager.UpdateText(player,questValue,finishValue,finishValue)
  904.                                         return
  905.                                 end
  906.                         end
  907.                 end
  908.         end
  909. end
  910.  
  911. function QuestManager.CompleteQuest(player,questValue,finishValue)
  912.         local playerQuestsGui = player.PlayerGui:WaitForChild("QuestGui").Frame.Quests
  913.         local questFinishedSlots = {{playerQuestsGui.QuestSlot1Finish,playerQuestsGui.d1Finish},{playerQuestsGui.QuestSlot2Finish,playerQuestsGui.d2Finish},{playerQuestsGui.QuestSlot3Finish,playerQuestsGui.d3Finish},
  914.         {playerQuestsGui.QuestSlot4Finish,playerQuestsGui.d4Finish},{playerQuestsGui.QuestSlot5Finish,playerQuestsGui.d5Finish},{playerQuestsGui.QuestSlot6Finish,playerQuestsGui.d6Finish}}
  915.         local questSlots = {playerQuestsGui.QuestSlot1,playerQuestsGui.QuestSlot2,playerQuestsGui.QuestSlot3,playerQuestsGui.QuestSlot4,playerQuestsGui.QuestSlot5,playerQuestsGui.QuestSlot6}
  916.        
  917.         local playerCompletedQuests = ds2("playercompletedquests",player):Get({})
  918.         table.insert(playerCompletedQuests,questValue)
  919.         ds2("playercompletedquests",player):Set(playerCompletedQuests)
  920.        
  921.         for i,questSlot in pairs(questSlots) do
  922.                 if questSlot:WaitForChild("QuestValue").Value == questValue then
  923.                         player:WaitForChild("Quests")[questValue].Value = false
  924.                         questSlot:WaitForChild("QuestCompleted").Value = true
  925.                        
  926.                         questFinishedSlots[i][1].Visible = true
  927.                         questFinishedSlots[i][2].Visible = true
  928.                         QuestManager.UpdateText(player,questValue,finishValue,finishValue)
  929.                         break
  930.                 end
  931.         end
  932. end
  933.  
  934. function QuestManager.CheckQuests(alivePlayers,deadPlayers,inGamePlayers,mapName)
  935.         print("---------Missions Info----------")
  936.         local map
  937.         repeat map = game.ReplicatedStorage.Maps[mapName] until map
  938.         repeat wait() until map and map:FindFirstChild("Difficulty")
  939.         local difficultyValue = map:FindFirstChild("Difficulty").Value
  940.         print(map:FindFirstChild("Difficulty").Value)
  941.         for i, player in pairs(inGamePlayers) do
  942.                 local playerQuestsGui = player.PlayerGui.QuestGui.Frame.Quests
  943.                 local questSlots = {playerQuestsGui.QuestSlot1,playerQuestsGui.QuestSlot2,playerQuestsGui.QuestSlot3,playerQuestsGui.QuestSlot4,playerQuestsGui.QuestSlot5,playerQuestsGui.QuestSlot6} 
  944.                 repeat wait() until player:FindFirstChild("Quests")
  945.                 repeat wait() until player:FindFirstChild("Quests"):FindFirstChild("Quest105")
  946.                
  947.                 if player.Quests.Quest1.Value then
  948.                         --makePopupEvent:FireClient(player,)
  949.                         if Quests.Quest1.Requirments.Requirment1(player,alivePlayers,map,difficultyValue) then
  950.                                 Quests.Quest1.RewardPlayer(player)
  951.                         end
  952.                 end
  953.                 if player.Quests.Quest2.Value then
  954.                         if Quests.Quest2.Requirments.Requirment1(player,alivePlayers,map,difficultyValue) then
  955.                                 Quests.Quest2.RewardPlayer(player)
  956.                         end
  957.                 end
  958.                 if player.Quests.Quest3.Value then
  959.                         if Quests.Quest3.Requirments.Requirment1(player,alivePlayers,map,difficultyValue) then
  960.                                 Quests.Quest3.RewardPlayer(player)
  961.                         end
  962.                 end
  963.                 if player.Quests.Quest4.Value then
  964.                         if Quests.Quest4.Requirments.Requirment1(player,alivePlayers,map) then
  965.                                 Quests.Quest4.RewardPlayer(player)
  966.                         end
  967.                 end
  968.                 if player.Quests.Quest5.Value then
  969.                         if Quests.Quest5.Requirments.Requirment1(player) then
  970.                                 Quests.Quest5.RewardPlayer(player)
  971.                         end
  972.                 end
  973.                 if player.Quests.Quest6.Value then
  974.                         if Quests.Quest6.Requirments.Requirment1(player) then
  975.                                 Quests.Quest6.RewardPlayer(player)
  976.                         end
  977.                 end
  978.                 if player.Quests.Quest7.Value then
  979.                         if Quests.Quest7.Requirments.Requirment1(player,alivePlayers,map,difficultyValue) then
  980.                                 Quests.Quest7.RewardPlayer(player)
  981.                         end
  982.                 end
  983.                 if player.Quests.Quest8.Value then
  984.                         if Quests.Quest8.Requirments.Requirment1(player,alivePlayers,deadPlayers,map,difficultyValue) then
  985.                                 Quests.Quest8.RewardPlayer(player)
  986.                         end
  987.                 end
  988.                
  989.                
  990.                 if player.Quests.Quest102.Value then
  991.                         if GemQuests.Quest102.Requirments.Requirment1(player,alivePlayers,deadPlayers,map) then
  992.                                 GemQuests.Quest102.RewardPlayer(player)
  993.                         end
  994.                 end
  995.                 if player.Quests.Quest103.Value then
  996.                         if GemQuests.Quest103.Requirments.Requirment1(player,alivePlayers,deadPlayers,map) then
  997.                                 GemQuests.Quest103.RewardPlayer(player)
  998.                         end
  999.                 end
  1000.                 if player.Quests.Quest104.Value then
  1001.                         if GemQuests.Quest104.Requirments.Requirment1(player,alivePlayers,deadPlayers,map,difficultyValue) then
  1002.                                 GemQuests.Quest104.RewardPlayer(player)
  1003.                         end
  1004.                 end
  1005.                 if player.Quests.Quest105.Value then
  1006.                         if GemQuests.Quest105.Requirments.Requirment1(player,alivePlayers,deadPlayers,map,difficultyValue) then
  1007.                                 GemQuests.Quest105.RewardPlayer(player)
  1008.                         end
  1009.                 end
  1010.         end
  1011.         print("--------------------------------")
  1012.         return true
  1013. end
  1014.  
  1015. return QuestManager