- -- Fully functional disease script with over 30 diseases which each produce their own set of symptoms. Diseases are spread through raycasting. Intended to be used for a SCPF Medical Department to add a whole layer of functionality above the typical click-to-heal gameplay you see in most SCPFs.
- local function getPlayerFromName(name)
- for _, player in pairs(game:GetService("Players"):GetPlayers()) do
- if player.Name:lower() == name:lower() then
- return player
- end
- end
- end
- local player = getPlayerFromName(script.Parent.Parent.Name)
- repeat wait() until player.Character
- local localCharacter = player.Character
- --// Services
- local Players = game:GetService("Players")
- --\\
- --// Checks
- local infected = false
- --\\
- local infections = {}
- local bindableEvent = game.ReplicatedStorage.BindableEvents.DiseaseTrigger
- local infectionsFolder = script.Parent.Infections
- --// Diseases
- -- Bacterial
- local bacterial = script.Parent.Infections.Bacterial
- local bacterialMeningitis = bacterial["Bacterial Meningitis"]
- local cholera = bacterial.Cholera
- local diphtheria = bacterial.Diphtheria
- local strepThroat = bacterial["Strep Throat"]
- local tuberculosis = bacterial.Tuberculosis
- local typhoid = bacterial.Typhoid
- local typhus = bacterial.Typhus
- local whoopingCough = bacterial["Whooping Cough"]
- --// Viral
- local viral = script.Parent.Infections.Viral
- local covid19 = viral["C19"]
- local ebola = viral.Ebola
- local influenza = viral.Influenza
- local measles = viral.Measles
- local norovirus = viral.Norovirus
- local polio = viral.Polio
- local respiratorySyncytialVirus = viral["Respiratory Syncytial Virus"]
- local rhinitis = viral.Rhinitis
- local rotavirus = viral.Rotavirus
- local rubella = viral.Rubella
- local severeAcuteRespiratorySyndrome = viral["Severe Acute Respiratory Syndrome"]
- local shingles = viral.Shingles
- local viralMeningitis = viral["Viral Meningitis"]
- local yellowFever = viral["Yellow Fever"]
- --\\
- --// Parasitic
- local parasitic = script.Parent.Infections.Parasitic
- local amebiasis = parasitic.Amebiasis
- local cysticercosis = parasitic.Cysticercosis
- local eVermicularis = parasitic["Evermicularis"]
- local echinococcosis = parasitic.Echinococcosis
- local malaria = parasitic.Malaria
- local toxocariasis = parasitic.Toxocariasis
- local trypanosomaCruzi = parasitic["Trypanosoma cruzi"]
- --\\
- --// Symptoms
- local symptoms = script.Parent.Infections.Symptoms
- local bleeding = symptoms.Bleeding
- local conjunctivitis = symptoms.Conjunctivitis
- local croup = symptoms.Croup
- local cyanosis = symptoms.Cyanosis
- local dry_cough = symptoms["Dry Cough"]
- local fainting = symptoms.Fainting
- local fatigue = symptoms.Fatigue
- local fever = symptoms.Fever
- local jaundice = symptoms.Jaundice
- local nausea = symptoms.Nausea
- local runnyNose = symptoms["Runny Nose"]
- local sneezing = symptoms.Sneezing
- local sweating = symptoms.Sweating
- local uncontrollable_cough = symptoms["Uncontrollable Coughing"]
- local vomiting = symptoms["Vomiting"]
- local wet_cough = symptoms["Wet Cough"]
- local wheezing = symptoms["Wheezing"]
- --\\
- local diseaseDictionary = {
- amebiasis = {
- diseaseName = amebiasis.Name,
- spreadDistance = 10,
- baseSpreadChance = 500,
- progressionSpeed = 1,
- symptomList = {
- nausea.Name,
- fever.Name,
- },
- vulnerabilities = {
- "Anti-Parasitic"
- },
- extremeVulnerabilities = {
- "Anti-Parasitic Beta"
- }
- },
- cysticercosis = {
- diseaseName = cysticercosis.Name,
- spreadDistance = 8,
- baseSpreadChance = 250,
- progressionSpeed = 1,
- symptomList = {
- fainting.Name,
- },
- vulnerabilities = {
- "Anti-Parasitic"
- },
- extremeVulnerabilities = {
- "Anti-Parasitic Alpha"
- }
- },
- evermicularis = {
- diseaseName = eVermicularis.Name,
- spreadDistance = 25,
- baseSpreadChance = 200,
- progressionSpeed = 1,
- symptomList = {
- fatigue.Name,
- },
- vulnerabilities = {
- "Anti-Parasitic"
- },
- extremeVulnerabilities = {
- "Anti-Parasitic Beta"
- }
- },
- echinococcosis = {
- diseaseName = echinococcosis.Name,
- spreadDistance = 10,
- baseSpreadChance = 200,
- progressionSpeed = 1,
- symptomList = {
- wet_cough.Name,
- fever.Name,
- },
- vulnerabilities = {
- "Anti-Parasitic"
- },
- extremeVulnerabilities = {
- "Anti-Parasitic Charlie"
- }
- },
- malaria = {
- diseaseName = malaria.Name,
- spreadDistance = 50,
- baseSpreadChance = 200,
- progressionSpeed = 1,
- symptomList = {
- fever.Name,
- nausea.Name,
- jaundice.Name,
- },
- vulnerabilities = {
- "Anti-Parasitic"
- },
- extremeVulnerabilities = {
- "Anti-Parasitic Alpha"
- }
- },
- toxocariasis = {
- diseaseName = toxocariasis.Name,
- spreadDistance = 10,
- baseSpreadChance = 500,
- progressionSpeed = 1,
- symptomList = {
- wheezing.Name,
- wet_cough.Name,
- },
- vulnerabilities = {
- "Anti-Parasitic"
- },
- extremeVulnerabilities = {
- "Anti-Parasitic Alpha"
- }
- },
- trypanosomacruzi = {
- diseaseName = trypanosomaCruzi.Name,
- spreadDistance = 30,
- baseSpreadChance = 250,
- progressionSpeed = 1,
- symptomList = {
- fever.Name,
- fatigue.Name,
- },
- vulnerabilities = {
- "Anti-Parasitic"
- },
- extremeVulnerabilities = {
- "Anti-Parasitic Charlie"
- }
- },
- c19 = {
- diseaseName = covid19.Name,
- spreadDistance = 50,
- baseSpreadChance = 50,
- progressionSpeed = 1,
- symptomList = {
- fever.Name,
- dry_cough.Name,
- fatigue.Name,
- },
- vulnerabilities = {
- "Anti-Viral"
- },
- extremeVulnerabilities = {
- "Anti-Viral Beta"
- }
- },
- ebola = {
- diseaseName = ebola.Name,
- spreadDistance = 10,
- baseSpreadChance = 500,
- progressionSpeed = 1,
- symptomList = {
- bleeding.Name,
- fever.Name,
- fatigue.Name,
- vomiting.Name,
- },
- vulnerabilities = {
- "Anti-Viral"
- },
- extremeVulnerabilities = {
- "Anti-Viral Charlie"
- }
- },
- influenza = {
- diseaseName = influenza.Name,
- spreadDistance = 40,
- baseSpreadChance = 50,
- progressionSpeed = 1,
- symptomList = {
- fever.Name,
- croup.Name,
- runnyNose.Name,
- },
- vulnerabilities = {
- "Anti-Viral"
- },
- extremeVulnerabilities = {
- "Anti-Viral Beta"
- }
- },
- measles = {
- diseaseName = measles.Name,
- spreadDistance = 30,
- baseSpreadChance = 80,
- progressionSpeed = 1,
- symptomList = {
- fever.Name,
- fatigue.Name,
- dry_cough.Name,
- conjunctivitis.Name,
- runnyNose.Name,
- },
- vulnerabilities = {
- "Anti-Viral"
- },
- extremeVulnerabilities = {
- "Anti-Viral Alpha"
- }
- },
- norovirus = {
- diseaseName = norovirus.Name,
- spreadDistance = 10,
- baseSpreadChance = 300,
- progressionSpeed = 1,
- symptomList = {
- vomiting.Name,
- nausea.Name,
- fever.Name,
- },
- vulnerabilities = {
- "Anti-Viral"
- },
- extremeVulnerabilities = {
- "Anti-Viral Alpha"
- }
- },
- polio = {
- diseaseName = polio.Name,
- spreadDistance = 10,
- baseSpreadChance = 400,
- progressionSpeed = 1,
- symptomList = {
- fever.Name,
- vomiting.Name,
- fatigue.Name,
- },
- vulnerabilities = {
- "Anti-Viral"
- },
- extremeVulnerabilities = {
- "Anti-Viral Charlie"
- }
- },
- respiratorysyncytialvirus = {
- diseaseName = respiratorySyncytialVirus.Name,
- spreadDistance = 35,
- baseSpreadChance = 100,
- progressionSpeed = 1,
- symptomList = {
- wet_cough.Name,
- cyanosis.Name,
- runnyNose.Name,
- sneezing.Name,
- wheezing.Name,
- },
- vulnerabilities = {
- "Anti-Viral"
- },
- extremeVulnerabilities = {
- "Anti-Viral Alpha"
- }
- },
- rhinitis = {
- diseaseName = rhinitis.Name,
- spreadDistance = 30,
- baseSpreadChance = 30,
- progressionSpeed = 1,
- symptomList = {
- wet_cough.Name,
- fever.Name,
- runnyNose.Name,
- sneezing.Name
- },
- vulnerabilities = {
- "Anti-Viral"
- },
- extremeVulnerabilities = {
- "Anti-Viral Alpha"
- }
- },
- rotavirus = {
- diseaseName = rotavirus.Name,
- spreadDistance = 10,
- baseSpreadChance = 300,
- progressionSpeed = 1,
- symptomList = {
- fatigue.Name,
- fever.Name,
- vomiting.Name,
- runnyNose.Name,
- },
- vulnerabilities = {
- "Anti-Viral"
- },
- extremeVulnerabilities = {
- "Anti-Viral Charlie"
- }
- },
- rubella = {
- diseaseName = rubella.Name,
- spreadDistance = 30,
- baseSpreadChance = 90,
- progressionSpeed = 1,
- symptomList = {
- fever.Name,
- runnyNose.Name,
- },
- vulnerabilities = {
- "Anti-Viral"
- },
- extremeVulnerabilities = {
- "Anti-Viral Beta"
- }
- },
- severeacuterespiratorysyndrome = {
- diseaseName = severeAcuteRespiratorySyndrome.Name,
- spreadDistance = 30,
- baseSpreadChance = 100,
- progressionSpeed = 1,
- symptomList = {
- fever.Name,
- dry_cough.Name,
- -- high body temp
- },
- vulnerabilities = {
- "Anti-Viral"
- },
- extremeVulnerabilities = {
- "Anti-Viral Charlie"
- }
- },
- shingles = {
- diseaseName = shingles.Name,
- spreadDistance = 25,
- baseSpreadChance = 100,
- progressionSpeed = 1,
- symptomList = {
- fever.Name
- },
- vulnerabilities = {
- "Anti-Viral"
- },
- extremeVulnerabilities = {
- "Anti-Viral Beta"
- }
- },
- viralmeningitis = {
- diseaseName = viralMeningitis.Name,
- spreadDistance = 15,
- baseSpreadChance = 150,
- progressionSpeed = 1,
- symptomList = {
- fatigue.Name,
- fever.Name,
- nausea.Name,
- vomiting.Name,
- fainting.Name,
- },
- vulnerabilities = {
- "Anti-Viral"
- },
- extremeVulnerabilities = {
- "Anti-Viral Beta"
- }
- },
- yellowfever = {
- diseaseName = yellowFever.Name,
- spreadDistance = 50,
- baseSpreadChance = 125,
- progressionSpeed = 1,
- symptomList = {
- jaundice.Name,
- fatigue.Name,
- fever.Name,
- nausea.Name,
- vomiting.Name,
- },
- vulnerabilities = {
- "Anti-Viral"
- },
- extremeVulnerabilities = {
- "Anti-Viral Alpha"
- }
- },
- bacterialmeningitis = {
- diseaseName = bacterialMeningitis.Name,
- spreadDistance = 20,
- baseSpreadChance = 200,
- progressionSpeed = 1,
- symptomList = {
- fever.Name,
- nausea.Name,
- vomiting.Name,
- fainting.Name
- },
- vulnerabilities = {
- "Anti-Bacterial"
- },
- extremeVulnerabilities = {
- "Anti-Bacterial Charlie"
- }
- },
- cholera = {
- diseaseName = cholera.Name,
- spreadDistance = 10,
- baseSpreadChance = 250,
- progressionSpeed = 1,
- symptomList = {
- vomiting.Name,
- },
- vulnerabilities = {
- "Anti-Bacterial"
- },
- extremeVulnerabilities = {
- "Anti-Bacterial Alpha"
- }
- },
- diphtheria = {
- diseaseName = diphtheria.Name,
- spreadDistance = 5,
- baseSpreadChance = 100,
- progressionSpeed = 1,
- symptomList = {
- wheezing.Name,
- runnyNose.Name,
- fever.Name,
- fatigue.Name
- },
- vulnerabilities = {
- "Anti-Bacterial"
- },
- extremeVulnerabilities = {
- "Anti-Bacterial Beta"
- }
- },
- strepthroat = {
- diseaseName = strepThroat.Name,
- spreadDistance = 20,
- baseSpreadChance = 100,
- progressionSpeed = 1,
- symptomList = {
- fever.Name,
- croup.Name,
- },
- vulnerabilities = {
- "Anti-Bacterial"
- },
- extremeVulnerabilities = {
- "Anti-Bacterial Charlie"
- }
- },
- tuberculosis = {
- diseaseName = tuberculosis.Name,
- spreadDistance = 30,
- baseSpreadChance = 75,
- progressionSpeed = 1,
- symptomList = {
- uncontrollable_cough.Name,
- fatigue.Name,
- fever.Name,
- },
- vulnerabilities = {
- "Anti-Bacterial"
- },
- extremeVulnerabilities = {
- "Anti-Bacterial Alpha"
- }
- },
- typhoid = {
- diseaseName = typhoid.Name,
- spreadDistance = 10,
- baseSpreadChance = 200,
- progressionSpeed = 1,
- symptomList = {
- dry_cough.Name,
- nausea.Name,
- },
- vulnerabilities = {
- "Anti-Bacterial"
- },
- extremeVulnerabilities = {
- "Anti-Bacterial Alpha"
- }
- },
- typhus = {
- diseaseName = typhus.Name,
- spreadDistance = 10,
- baseSpreadChance = 150,
- progressionSpeed = 1,
- symptomList = {
- fever.Name,
- fatigue.Name,
- },
- vulnerabilities = {
- "Anti-Bacterial"
- },
- extremeVulnerabilities = {
- "Anti-Bacterial Beta"
- }
- },
- whoopingcough = {
- diseaseName = whoopingCough.Name,
- spreadDistance = 30,
- baseSpreadChance = 100,
- progressionSpeed = 1,
- symptomList = {
- runnyNose.Name,
- sneezing.Name,
- uncontrollable_cough.Name,
- vomiting.Name,
- },
- vulnerabilities = {
- "Anti-Bacterial"
- },
- extremeVulnerabilities = {
- "Anti-Bacterial Beta"
- }
- },
- }
- local medication = script.Parent.Medication
- local function addSymtpoms(diseaseName)
- for i,symptomsv in pairs(diseaseDictionary[diseaseName]["symptomList"]) do
- for i,disease in pairs(infectionsFolder:GetDescendants()) do
- if disease.Name == symptomsv then
- disease.Value = false
- disease.Value = true
- end
- end
- end
- end
- local function removeSymtpoms(diseaseName)
- for i,symptomsv in pairs(diseaseDictionary[diseaseName]["symptomList"]) do
- for i,disease in pairs(infectionsFolder:GetDescendants()) do
- if disease.Name == symptomsv then
- disease.Value = false
- end
- end
- end
- end
- local function filter(str)
- return str:gsub(" ",""):lower()
- end
- respiratorySyncytialVirus.Changed:Connect(function()
- if respiratorySyncytialVirus.Value == true then
- respiratorySyncytialVirus.Progression.Value = 900
- infected = true
- table.insert(infections, respiratorySyncytialVirus.Name)
- addSymtpoms(filter(respiratorySyncytialVirus.Name))
- else
- table.remove(infections, table.find(infections, respiratorySyncytialVirus.Name))
- removeSymtpoms(filter(respiratorySyncytialVirus.Name))
- if #infections == 0 then
- infected = false
- end
- end
- end)
- covid19.Changed:Connect(function()
- if covid19.Value == true then
- covid19.Progression.Value = 900
- infected = true
- table.insert(infections, covid19.Name)
- addSymtpoms(filter(covid19.Name))
- else
- table.remove(infections, table.find(infections, covid19.Name))
- removeSymtpoms(filter(covid19.Name))
- if #infections == 0 then
- infected = false
- end
- end
- end)
- polio.Changed:Connect(function()
- if polio.Value == true then
- polio.Progression.Value = 900
- infected = true
- table.insert(infections, polio.Name)
- addSymtpoms(filter(polio.Name))
- else
- table.remove(infections, table.find(infections, polio.Name))
- removeSymtpoms(filter(polio.Name))
- if #infections == 0 then
- infected = false
- end
- end
- end)
- yellowFever.Changed:Connect(function()
- if yellowFever.Value == true then
- yellowFever.Progression.Value = 900
- infected = true
- table.insert(infections, yellowFever.Name)
- addSymtpoms(filter(yellowFever.Name))
- else
- table.remove(infections, table.find(infections, yellowFever.Name))
- removeSymtpoms(filter(yellowFever.Name))
- if #infections == 0 then
- infected = false
- end
- end
- end)
- rubella.Changed:Connect(function()
- if rubella.Value == true then
- rubella.Progression.Value = 900
- infected = true
- table.insert(infections, rubella.Name)
- addSymtpoms(filter(rubella.Name))
- else
- table.remove(infections, table.find(infections, rubella.Name))
- removeSymtpoms(filter(rubella.Name))
- if #infections == 0 then
- infected = false
- end
- end
- end)
- rotavirus.Changed:Connect(function()
- if rotavirus.Value == true then
- rotavirus.Progression.Value = 900
- infected = true
- table.insert(infections, rotavirus.Name)
- addSymtpoms(filter(rotavirus.Name))
- else
- table.remove(infections, table.find(infections, rotavirus.Name))
- removeSymtpoms(filter(rotavirus.Name))
- if #infections == 0 then
- infected = false
- end
- end
- end)
- norovirus.Changed:Connect(function()
- if norovirus.Value == true then
- norovirus.Progression.Value = 900
- infected = true
- table.insert(infections, norovirus.Name)
- addSymtpoms(filter(norovirus.Name))
- else
- table.remove(infections, table.find(infections, norovirus.Name))
- removeSymtpoms(filter(norovirus.Name))
- if #infections == 0 then
- infected = false
- end
- end
- end)
- viralMeningitis.Changed:Connect(function()
- if viralMeningitis.Value == true then
- viralMeningitis.Progression.Value = 900
- infected = true
- table.insert(infections, viralMeningitis.Name)
- addSymtpoms(filter(viralMeningitis.Name))
- else
- table.remove(infections, table.find(infections, viralMeningitis.Name))
- removeSymtpoms(filter(viralMeningitis.Name))
- if #infections == 0 then
- infected = false
- end
- end
- end)
- rotavirus.Changed:Connect(function()
- if rotavirus.Value == true then
- rotavirus.Progression.Value = 900
- infected = true
- table.insert(infections, rotavirus.Name)
- addSymtpoms(filter(rotavirus.Name))
- else
- table.remove(infections, table.find(infections, rotavirus.Name))
- removeSymtpoms(filter(rotavirus.Name))
- if #infections == 0 then
- infected = false
- end
- end
- end)
- measles.Changed:Connect(function()
- if measles.Value == true then
- measles.Progression.Value = 900
- infected = true
- table.insert(infections, measles.Name)
- addSymtpoms(filter(measles.Name))
- else
- table.remove(infections, table.find(infections, measles.Name))
- removeSymtpoms(filter(measles.Name))
- if #infections == 0 then
- infected = false
- end
- end
- end)
- shingles.Changed:Connect(function()
- if shingles.Value == true then
- shingles.Progression.Value = 900
- infected = true
- table.insert(infections, shingles.Name)
- addSymtpoms(filter(shingles.Name))
- else
- table.remove(infections, table.find(infections, shingles.Name))
- removeSymtpoms(filter(shingles.Name))
- if #infections == 0 then
- infected = false
- end
- end
- end)
- severeAcuteRespiratorySyndrome.Changed:Connect(function()
- if severeAcuteRespiratorySyndrome.Value == true then
- severeAcuteRespiratorySyndrome.Progression.Value = 900
- infected = true
- table.insert(infections, severeAcuteRespiratorySyndrome.Name)
- addSymtpoms(filter(severeAcuteRespiratorySyndrome.Name))
- else
- table.remove(infections, table.find(infections, severeAcuteRespiratorySyndrome.Name))
- removeSymtpoms(filter(severeAcuteRespiratorySyndrome.Name))
- if #infections == 0 then
- infected = false
- end
- end
- end)
- rhinitis.Changed:Connect(function()
- if rhinitis.Value == true then
- rhinitis.Progression.Value = 900
- infected = true
- table.insert(infections, rhinitis.Name)
- addSymtpoms(filter(rhinitis.Name))
- else
- table.remove(infections, table.find(infections, rhinitis.Name))
- removeSymtpoms(filter(rhinitis.Name))
- if #infections == 0 then
- infected = false
- end
- end
- end)
- influenza.Changed:Connect(function()
- if influenza.Value == true then
- influenza.Progression.Value = 900
- infected = true
- table.insert(infections, influenza.Name)
- addSymtpoms(filter(influenza.Name))
- else
- table.remove(infections, table.find(infections, influenza.Name))
- removeSymtpoms(filter(influenza.Name))
- if #infections == 0 then
- infected = false
- end
- end
- end)
- ebola.Changed:Connect(function()
- if ebola.Value == true then
- ebola.Progression.Value = 900
- infected = true
- table.insert(infections, ebola.Name)
- addSymtpoms(filter(ebola.Name))
- else
- table.remove(infections, table.find(infections, ebola.Name))
- removeSymtpoms(filter(ebola.Name))
- if #infections == 0 then
- infected = false
- end
- end
- end)
- cysticercosis.Changed:Connect(function()
- if cysticercosis.Value == true then
- cysticercosis.Progression.Value = 900
- infected = true
- table.insert(infections, cysticercosis.Name)
- addSymtpoms(filter(cysticercosis.Name))
- else
- table.remove(infections, table.find(infections, cysticercosis.Name))
- removeSymtpoms(filter(cysticercosis.Name))
- if #infections == 0 then
- infected = false
- end
- end
- end)
- amebiasis.Changed:Connect(function()
- if amebiasis.Value == true then
- amebiasis.Progression.Value = 900
- infected = true
- table.insert(infections, amebiasis.Name)
- addSymtpoms(filter(amebiasis.Name))
- else
- table.remove(infections, table.find(infections, amebiasis.Name))
- removeSymtpoms(filter(amebiasis.Name))
- if #infections == 0 then
- infected = false
- end
- end
- end)
- trypanosomaCruzi.Changed:Connect(function()
- if trypanosomaCruzi.Value == true then
- trypanosomaCruzi.Progression.Value = 900
- infected = true
- table.insert(infections, trypanosomaCruzi.Name)
- addSymtpoms(filter(trypanosomaCruzi.Name))
- else
- table.remove(infections, table.find(infections, trypanosomaCruzi.Name))
- removeSymtpoms(filter(trypanosomaCruzi.Name))
- if #infections == 0 then
- infected = false
- end
- end
- end)
- malaria.Changed:Connect(function()
- if malaria.Value == true then
- malaria.Progression.Value = 900
- infected = true
- table.insert(infections, malaria.Name)
- addSymtpoms(filter(malaria.Name))
- else
- table.remove(infections, table.find(infections, malaria.Name))
- removeSymtpoms(filter(malaria.Name))
- if #infections == 0 then
- infected = false
- end
- end
- end)
- eVermicularis.Changed:Connect(function()
- if eVermicularis.Value == true then
- eVermicularis.Progression.Value = 900
- infected = true
- table.insert(infections, eVermicularis.Name)
- addSymtpoms(filter(eVermicularis.Name))
- else
- table.remove(infections, table.find(infections, eVermicularis.Name))
- removeSymtpoms(filter(eVermicularis.Name))
- if #infections == 0 then
- infected = false
- end
- end
- end)
- echinococcosis.Changed:Connect(function()
- if echinococcosis.Value == true then
- echinococcosis.Progression.Value = 900
- infected = true
- table.insert(infections, echinococcosis.Name)
- addSymtpoms(filter(echinococcosis.Name))
- else
- table.remove(infections, table.find(infections, echinococcosis.Name))
- removeSymtpoms(filter(echinococcosis.Name))
- if #infections == 0 then
- infected = false
- end
- end
- end)
- toxocariasis.Changed:Connect(function()
- if toxocariasis.Value == true then
- toxocariasis.Progression.Value = 900
- infected = true
- table.insert(infections, toxocariasis.Name)
- addSymtpoms(filter(toxocariasis.Name))
- else
- table.remove(infections, table.find(infections, toxocariasis.Name))
- removeSymtpoms(filter(toxocariasis.Name))
- if #infections == 0 then
- infected = false
- end
- end
- end)
- tuberculosis.Changed:Connect(function()
- if tuberculosis.Value == true then
- tuberculosis.Progression.Value = 900
- infected = true
- table.insert(infections, tuberculosis.Name)
- addSymtpoms(filter(tuberculosis.Name))
- else
- table.remove(infections, table.find(infections, tuberculosis.Name))
- removeSymtpoms(filter(tuberculosis.Name))
- if #infections == 0 then
- infected = false
- end
- end
- end)
- whoopingCough.Changed:Connect(function()
- if whoopingCough.Value == true then
- whoopingCough.Progression.Value = 900
- infected = true
- table.insert(infections, whoopingCough.Name)
- addSymtpoms(filter(whoopingCough.Name))
- else
- table.remove(infections, table.find(infections, whoopingCough.Name))
- removeSymtpoms(filter(whoopingCough.Name))
- if #infections == 0 then
- infected = false
- end
- end
- end)
- bacterialMeningitis.Changed:Connect(function()
- if bacterialMeningitis.Value == true then
- bacterialMeningitis.Progression.Value = 1800
- infected = true
- table.insert(infections, bacterialMeningitis.Name)
- addSymtpoms(filter(bacterialMeningitis.Name))
- else
- table.remove(infections, table.find(infections, bacterialMeningitis.Name))
- removeSymtpoms(filter(bacterialMeningitis.Name))
- if #infections == 0 then
- infected = false
- end
- end
- end)
- cholera.Changed:Connect(function()
- if cholera.Value == true then
- cholera.Progression.Value = 1800
- infected = true
- table.insert(infections, cholera.Name)
- addSymtpoms(filter(cholera.Name))
- else
- table.remove(infections, table.find(infections, cholera.Name))
- removeSymtpoms(filter(cholera.Name))
- if #infections == 0 then
- infected = false
- end
- end
- end)
- diphtheria.Changed:Connect(function()
- if diphtheria.Value == true then
- diphtheria.Progression.Value = 1800
- infected = true
- table.insert(infections, diphtheria.Name)
- addSymtpoms(filter(diphtheria.Name))
- else
- table.remove(infections, table.find(infections, diphtheria.Name))
- removeSymtpoms(filter(diphtheria.Name))
- if #infections == 0 then
- infected = false
- end
- end
- end)
- strepThroat.Changed:Connect(function()
- if strepThroat.Value == true then
- strepThroat.Progression.Value = 1800
- infected = true
- table.insert(infections, strepThroat.Name)
- addSymtpoms(filter(strepThroat.Name))
- else
- table.remove(infections, table.find(infections, strepThroat.Name))
- removeSymtpoms(filter(strepThroat.Name))
- if #infections == 0 then
- infected = false
- end
- end
- end)
- typhoid.Changed:Connect(function()
- if typhoid.Value == true then
- typhoid.Progression.Value = 1800
- infected = true
- table.insert(infections, typhoid.Name)
- addSymtpoms(filter(typhoid.Name))
- else
- table.remove(infections, table.find(infections, typhoid.Name))
- removeSymtpoms(filter(typhoid.Name))
- if #infections == 0 then
- infected = false
- end
- end
- end)
- typhus.Changed:Connect(function()
- if typhus.Value == true then
- typhus.Progression.Value = 1800
- infected = true
- table.insert(infections, typhus.Name)
- addSymtpoms(filter(typhus.Name))
- else
- table.remove(infections, table.find(infections, typhus.Name))
- removeSymtpoms(filter(typhus.Name))
- if #infections == 0 then
- infected = false
- end
- end
- end)
- -- progression changes
- --// Bacterial
- bacterialMeningitis.Progression.Changed:Connect(function()
- if bacterialMeningitis.Progression.Value == 0 then
- bacterialMeningitis.Value = false
- end
- end)
- cholera.Progression.Changed:Connect(function()
- if cholera.Progression.Value == 0 then
- cholera.Value = false
- end
- end)
- diphtheria.Progression.Changed:Connect(function()
- if diphtheria.Progression.Value == 0 then
- diphtheria.Value = false
- end
- end)
- strepThroat.Progression.Changed:Connect(function()
- if strepThroat.Progression.Value == 0 then
- strepThroat.Value = false
- end
- end)
- tuberculosis.Progression.Changed:Connect(function()
- if tuberculosis.Progression.Value == 0 then
- tuberculosis.Value = false
- end
- end)
- typhoid.Progression.Changed:Connect(function()
- if typhoid.Progression.Value == 0 then
- typhoid.Value = false
- end
- end)
- typhus.Progression.Changed:Connect(function()
- if typhus.Progression.Value == 0 then
- typhus.Value = false
- end
- end)
- whoopingCough.Progression.Changed:Connect(function()
- if whoopingCough.Progression.Value == 0 then
- whoopingCough.Value = false
- end
- end)
- --// Viral
- covid19.Progression.Changed:Connect(function()
- if covid19.Progression.Value == 0 then
- covid19.Value = false
- end
- end)
- ebola.Progression.Changed:Connect(function()
- if ebola.Progression.Value == 0 then
- ebola.Value = false
- end
- end)
- ebola.Progression.Changed:Connect(function()
- if ebola.Progression.Value == 0 then
- ebola.Value = false
- end
- end)
- influenza.Progression.Changed:Connect(function()
- if influenza.Progression.Value == 0 then
- influenza.Value = false
- end
- end)
- measles.Progression.Changed:Connect(function()
- if measles.Progression.Value == 0 then
- measles.Value = false
- end
- end)
- norovirus.Progression.Changed:Connect(function()
- if norovirus.Progression.Value == 0 then
- norovirus.Value = false
- end
- end)
- polio.Progression.Changed:Connect(function()
- if polio.Progression.Value == 0 then
- polio.Value = false
- end
- end)
- respiratorySyncytialVirus.Progression.Changed:Connect(function()
- if respiratorySyncytialVirus.Progression.Value == 0 then
- respiratorySyncytialVirus.Value = false
- end
- end)
- rhinitis.Progression.Changed:Connect(function()
- if rhinitis.Progression.Value == 0 then
- rhinitis.Value = false
- end
- end)
- rotavirus.Progression.Changed:Connect(function()
- if rotavirus.Progression.Value == 0 then
- rotavirus.Value = false
- end
- end)
- rubella.Progression.Changed:Connect(function()
- if rubella.Progression.Value == 0 then
- rubella.Value = false
- end
- end)
- severeAcuteRespiratorySyndrome.Progression.Changed:Connect(function()
- if severeAcuteRespiratorySyndrome.Progression.Value == 0 then
- severeAcuteRespiratorySyndrome.Value = false
- end
- end)
- shingles.Progression.Changed:Connect(function()
- if shingles.Progression.Value == 0 then
- shingles.Value = false
- end
- end)
- viralMeningitis.Progression.Changed:Connect(function()
- if viralMeningitis.Progression.Value == 0 then
- viralMeningitis.Value = false
- end
- end)
- yellowFever.Progression.Changed:Connect(function()
- if yellowFever.Progression.Value == 0 then
- yellowFever.Value = false
- end
- end)
- --\\
- --// Parasitic
- amebiasis.Progression.Changed:Connect(function()
- if amebiasis.Progression.Value == 0 then
- amebiasis.Value = false
- end
- end)
- cysticercosis.Progression.Changed:Connect(function()
- if cysticercosis.Progression.Value == 0 then
- cysticercosis.Value = false
- end
- end)
- eVermicularis.Progression.Changed:Connect(function()
- if eVermicularis.Progression.Value == 0 then
- eVermicularis.Value = false
- end
- end)
- echinococcosis.Progression.Changed:Connect(function()
- if echinococcosis.Progression.Value == 0 then
- echinococcosis.Value = false
- end
- end)
- malaria.Progression.Changed:Connect(function()
- if malaria.Progression.Value == 0 then
- malaria.Value = false
- end
- end)
- toxocariasis.Progression.Changed:Connect(function()
- if toxocariasis.Progression.Value == 0 then
- toxocariasis.Value = false
- end
- end)
- toxocariasis.Progression.Changed:Connect(function()
- if toxocariasis.Progression.Value == 0 then
- toxocariasis.Value = false
- end
- end)
- --\\
- --// Symptom Effects
- local diseaseEffects = game.ServerStorage.DiseaseEffects
- local temperature = localCharacter:WaitForChild("Temperature")
- local croupEffect = diseaseEffects.Croup
- local dryCoughEffect = diseaseEffects["Dry Cough"]
- local wetCoughEffect = diseaseEffects["Wet Cough"]
- local uncontrollableCoughEffect = diseaseEffects["Uncontrollable Coughing"]
- local runnyNoseEffect = diseaseEffects["Runny Nose"]
- local vomitEffect = diseaseEffects.Vomiting
- local conjunctivitisEffect = diseaseEffects.Conjunctivitis
- local jaundiceEffect = diseaseEffects.Jaundice
- local cyanosisEffect = diseaseEffects.Cyanosis
- local sneezingEffect = diseaseEffects.Sneezing
- local sweatEffect = diseaseEffects.Sweating
- local wheezeEffect = diseaseEffects.Wheezing
- local faintRemote = game.ReplicatedStorage.Events.Faint
- local nauseaRemote = game.ReplicatedStorage.Events.Nausea
- local torso = localCharacter.UpperTorso
- local playerGui = player.PlayerGui
- local feverTemperature = 2
- fever.Changed:Connect(function()
- if fever.Value == true then
- temperature.Base.Value += feverTemperature
- else
- temperature.Base.Value -= feverTemperature
- end
- end)
- bleeding.Changed:Connect(function()
- if bleeding.Value == true then
- local PFX = diseaseEffects.Bleeding.Blood
- local newPFX = PFX:Clone()
- newPFX.Parent = torso
- else
- if torso:FindFirstChild("Blood") then
- torso:FindFirstChild("Blood"):Destroy()
- end
- end
- end)
- conjunctivitis.Changed:Connect(function()
- if conjunctivitis.Value == true then
- local newEffect = conjunctivitisEffect.Conjunctivitis:Clone()
- newEffect.Parent = playerGui
- else
- if script.Parent.Parent:FindFirstChild("Conjunctivitis") then
- playerGui:FindFirstChild("Conjunctivitis"):Destroy()
- end
- end
- end)
- cyanosis.Changed:Connect(function()
- if cyanosis.Value == true then
- for i,v in pairs(cyanosisEffect:GetChildren()) do
- for i2, v2 in pairs(localCharacter:GetChildren()) do
- if v2:IsA("BasePart") and v2.Name == v.Name then
- for i3, v3 in pairs(v:GetChildren()) do
- local newEffect = v3:Clone()
- newEffect.Parent = v2
- end
- end
- end
- end
- else
- for i,v in pairs(localCharacter:GetDescendants()) do
- if v.Name == "Cyanosis" then
- v:Destroy()
- end
- end
- end
- end)
- dry_cough.Changed:Connect(function()
- if dry_cough.Value == true then
- for i,v in pairs(dryCoughEffect:GetChildren()) do
- local newEffect = v:Clone()
- newEffect.Parent = localCharacter.Head
- end
- else
- for i,v in pairs(localCharacter.Head:GetChildren()) do
- for i2,v2 in pairs(dryCoughEffect:GetChildren()) do
- if v.Name == v2.Name then
- v:Destroy()
- end
- end
- end
- end
- end)
- croup.Changed:Connect(function()
- if croup.Value == true then
- for i,v in pairs(croupEffect:GetChildren()) do
- local newEffect = v:Clone()
- newEffect.Parent = localCharacter.Head
- end
- else
- for i,v in pairs(localCharacter.Head:GetChildren()) do
- for i2,v2 in pairs(croupEffect:GetChildren()) do
- if v.Name == v2.Name then
- v:Destroy()
- end
- end
- end
- end
- end)
- wet_cough.Changed:Connect(function()
- if wet_cough.Value == true then
- for i,v in pairs(wetCoughEffect:GetChildren()) do
- local newEffect = v:Clone()
- newEffect.Parent = localCharacter.Head
- end
- else
- for i,v in pairs(localCharacter.Head:GetChildren()) do
- for i2,v2 in pairs(wetCoughEffect:GetChildren()) do
- if v.Name == v2.Name then
- v:Destroy()
- end
- end
- end
- end
- end)
- fatigue.Changed:Connect(function()
- if fatigue.Value == true then
- playerGui:FindFirstChild("Fatigue").Enabled = true
- else
- playerGui:FindFirstChild("Fatigue").Enabled = false
- end
- end)
- jaundice.Changed:Connect(function()
- if jaundice.Value == true then
- for i,v in pairs(jaundiceEffect:GetChildren()) do
- for i2, v2 in pairs(localCharacter:GetChildren()) do
- if v2:IsA("BasePart") and v2.Name == v.Name then
- for i3, v3 in pairs(v:GetChildren()) do
- local newEffect = v3:Clone()
- newEffect.Parent = v2
- end
- end
- end
- end
- else
- for i,v in pairs(localCharacter:GetDescendants()) do
- if v.Name == "Jaundice" then
- v:Destroy()
- end
- end
- end
- end)
- nausea.Changed:Connect(function()
- if nausea.Value == true then
- nauseaRemote:FireClient(player, "Start")
- else
- nauseaRemote:FireClient(player, "Stop")
- end
- end)
- runnyNose.Changed:Connect(function()
- if runnyNose.Value == true then
- local snotAttachment = Instance.new("Attachment")
- snotAttachment.Parent = localCharacter.Head
- snotAttachment.Name = "snotAttachment"
- snotAttachment.Position = Vector3.new(-0.1, 0, -0.619)
- for i,v in pairs(runnyNoseEffect:GetChildren()) do
- v.Parent = localCharacter.Head.snotAttachment
- end
- else
- localCharacter.Head:FindFirstChild("snotAttachment"):Destroy()
- end
- end)
- sneezing.Changed:Connect(function()
- if sneezing.Value == true then
- local newEffect = sneezingEffect:Clone()
- newEffect.Parent = localCharacter.Head
- else
- localCharacter.Head:FindFirstChild("Sneezing"):Destroy()
- end
- end)
- sweating.Changed:Connect(function()
- if sweating.Value == true then
- local newEffect = sweatEffect.SweatBoundingBox:Clone()
- newEffect.Position = localCharacter.Head.Position
- local newWeld = Instance.new("Weld")
- newWeld.Parent = localCharacter.Head
- newWeld.Part0 = localCharacter.Head
- newWeld.Part1 = newEffect
- newEffect.Parent = localCharacter
- else
- if localCharacter:FindFirstChild("SweatBoundingBox") then
- localCharacter:FindFirstChild("SweatBoundingBox"):Destroy()
- end
- end
- end)
- uncontrollable_cough.Changed:Connect(function()
- if uncontrollable_cough.Value == true then
- for i,v in pairs(uncontrollableCoughEffect:GetChildren()) do
- local newEffect = v:Clone()
- newEffect.Parent = localCharacter.Head
- end
- else
- for i,v in pairs(localCharacter.Head:GetChildren()) do
- for i2,v2 in pairs(uncontrollableCoughEffect:GetChildren()) do
- if v.Name == v2.Name then
- v:Destroy()
- end
- end
- end
- end
- end)
- vomiting.Changed:Connect(function()
- if vomiting.Value == true then
- print("yo")
- local vomitAttachment = Instance.new("Attachment")
- vomitAttachment.Parent = localCharacter.Head
- vomitAttachment.Name = "vomitAttachment"
- vomitAttachment.Position = Vector3.new(0, -0.257, -0.638)
- for i,v in pairs(vomitEffect:GetChildren()) do
- local newEffect = v:Clone()
- newEffect.Parent = localCharacter.Head.vomitAttachment
- end
- else
- if localCharacter.Head:FindFirstChild("vomitAttachment") then
- localCharacter.Head.vomitAttachment:Destroy()
- end
- end
- end)
- wheezing.Changed:Connect(function()
- if wheezing.Value == true then
- for i,v in pairs(wheezeEffect:GetChildren()) do
- local newEffect = v:Clone()
- newEffect.Parent = localCharacter.Head
- end
- localCharacter.Head.Wheeze:Play()
- else
- for i,v in pairs(localCharacter.Head:GetChildren()) do
- for i2,v2 in pairs(uncontrollableCoughEffect:GetChildren()) do
- if v.Name == v2.Name then
- v:Destroy()
- end
- end
- end
- end
- end)
- --\\
- medication.Changed:Connect(function()
- if medication.Value then
- medication.Progression.Value = 30
- end
- end)
- local fainted = false
- local coughing = false
- bindableEvent.Event:Connect(function(diseaseDefence, playerName, infectionsTable, hygiene)
- if playerName == tostring(player.Name) then
- for i,ailment in pairs(infectionsTable) do
- local disease = diseaseDictionary[filter(ailment)]
- local diseaseName = disease["diseaseName"]
- local spreadChance = disease["baseSpreadChance"]
- local chance = math.round((spreadChance/100)*((100+diseaseDefence-hygiene)))
- if chance < 1 then
- chance = 1
- end
- local isInfected = math.random(1, chance)
- if isInfected == 1 then
- for i,disease in pairs(infectionsFolder:GetDescendants()) do
- if disease.Name == diseaseName then
- disease.Value = true
- end
- end
- end
- end
- end
- end)
- local DataStoreService = game:GetService("DataStoreService")
- local infectionStore = DataStoreService:GetDataStore("InfectionsDataStore_Beta")
- local success, currentInfections = pcall(function()
- return infectionStore:GetAsync(player.UserId)
- end)
- if success then
- for i,v in pairs(currentInfections) do
- for i2, v2 in pairs(infectionsFolder:GetDescendants()) do
- if v2.Name == v then
- v2.Value = true
- end
- end
- end
- end
- Players.PlayerRemoving:Connect(function()
- local success, errorMessage = pcall(function()
- infectionStore:SetAsync(player.UserId, infections)
- end)
- if not success then
- print(errorMessage)
- end
- end)
- player.CharacterAdded:Connect(function()
- localCharacter = player.Character
- for i,v in pairs(infections) do
- addSymtpoms(filter(v))
- end
- end)
- local params = RaycastParams.new()
- params.FilterDescendantsInstances = {localCharacter}
- params.FilterType = Enum.RaycastFilterType.Blacklist
- params.IgnoreWater = true
- while true do
- wait(1)
- if medication.Value then
- if medication.Progression.Value > 0 then
- medication.Progression.Value -= 1
- end
- end
- if medication.Progression.Value == 0 then
- medication.Value = ""
- end
- if bleeding.Value == true then
- if localCharacter:FindFirstChild("Humanoid") then
- localCharacter.Humanoid:TakeDamage(.1)
- end
- end
- if dry_cough.Value == true then
- local randomChance = math.random(1,10)
- if randomChance == 1 and coughing == false then
- task.spawn(function()
- coughing = true
- if localCharacter.Head:FindFirstChild("DryCough") then
- localCharacter.Head.DryCough:Play()
- localCharacter.Head.Dry_Cough.Enabled = true
- localCharacter.Head.DryCough.Ended:Wait()
- localCharacter.Head.Dry_Cough.Enabled = false
- end
- coughing = false
- end)
- end
- end
- if croup.Value == true then
- local randomChance = math.random(1,10)
- if randomChance == 1 and coughing == false then
- task.spawn(function()
- coughing = true
- if localCharacter.Head:FindFirstChild("Croup") then
- localCharacter.Head.Croup:Play()
- localCharacter.Head.Croup_Cough.Enabled = true
- localCharacter.Head.Croup.Ended:Wait()
- localCharacter.Head.Croup_Cough.Enabled = false
- end
- coughing = false
- end)
- end
- end
- if uncontrollable_cough.Value == true then
- local randomChance = math.random(1,10)
- if randomChance == 1 and coughing == false then
- task.spawn(function()
- for i = 3, 1, -1 do
- coughing = true
- if localCharacter.Head:FindFirstChild("UncontrollableCough") then
- localCharacter.Head.UncontrollableCough:Play()
- localCharacter.Head.Uncontrollable_Cough.Enabled = true
- localCharacter.Head.UncontrollableCough.Ended:Wait()
- localCharacter.Head.Uncontrollable_Cough.Enabled = false
- wait(math.random(.1,1.5))
- end
- end
- coughing = false
- end)
- end
- end
- if wet_cough.Value == true then
- local randomChance = math.random(1,10)
- if randomChance == 1 and coughing == false then
- task.spawn(function()
- coughing = true
- if localCharacter.Head:FindFirstChild("WetCough") then
- localCharacter.Head.WetCough:Play()
- localCharacter.Head.Wet_Cough.Enabled = true
- localCharacter.Head.WetCough.Ended:Wait()
- localCharacter.Head.Wet_Cough.Enabled = false
- end
- coughing = true
- end)
- end
- end
- if fainting.Value == true and fainted == false then
- local randomChance = math.random(1,10)
- if randomChance == 1 then
- task.spawn(function()
- fainted = true
- faintRemote:FireClient(player, math.random(1,5))
- wait(10)
- fainted = false
- end)
- end
- end
- if sneezing.Value == true then
- local randomChance = math.random(1,10)
- if randomChance == 1 then
- task.spawn(function()
- if localCharacter.Head:FindFirstChild("Sneezing") then
- localCharacter.Head.Sneezing.Sneezing.Enabled = true
- localCharacter.Head.Sneezing.Sneeze:Play()
- localCharacter.Head.Sneezing.Sneeze.Ended:Wait()
- localCharacter.Head.Sneezing.Sneezing.Enabled = false
- end
- end)
- end
- end
- if vomiting.Value == true then
- local randomChance = math.random(1,5)
- if randomChance == 1 then
- if localCharacter.Head:FindFirstChild("vomitAttachment") then
- for i,v in pairs(localCharacter.Head.vomitAttachment:GetChildren()) do
- for i2,v2 in pairs(vomitEffect:GetChildren()) do
- if v2.Name == v.Name then
- local waitTime = math.random(1,3)
- task.spawn(function()
- v.Enabled = true
- wait(waitTime)
- v.Enabled = false
- end)
- end
- end
- end
- end
- end
- end
- if infected == true then
- for i,diseases in pairs(infections) do
- local spreadDistance = diseaseDictionary[filter(diseases)]["spreadDistance"]
- local progressionSpeed = diseaseDictionary[filter(diseases)]["progressionSpeed"]
- local diseaseName = diseaseDictionary[filter(diseases)]["diseaseName"]
- for i,v in pairs(infectionsFolder:GetDescendants()) do
- if v.Name == diseaseName then
- diseaseObject = v
- end
- end
- local diseaseProgression = diseaseObject.Progression
- if diseaseProgression.Value ~= 0 then
- for i,v in pairs(diseaseDictionary[filter(diseases)]["vulnerabilities"]) do
- if medication.Value then
- if medication.Value == v then
- progressionSpeed = progressionSpeed*2
- end
- end
- end
- for i,v in pairs(diseaseDictionary[filter(diseases)]["extremeVulnerabilities"]) do
- if medication.Value then
- if medication.Value == v then
- progressionSpeed = progressionSpeed*5
- end
- end
- end
- diseaseProgression.Value -= progressionSpeed
- print(diseaseName.." progression: "..diseaseProgression.Value)
- end
- for i,char in pairs(Players:GetChildren()) do
- if char ~= player then
- local character = char.Character
- local hrp = character.HumanoidRootPart
- local rayEnd = CFrame.lookAt(localCharacter.HumanoidRootPart.Position, hrp.Position)
- local RayResult = workspace:Raycast(localCharacter.HumanoidRootPart.Position, rayEnd.LookVector * spreadDistance, params)
- if RayResult then
- local hitpart = RayResult.Instance
- local model = hitpart:FindFirstAncestorOfClass("Model") or hitpart:FindFirstAncestorOfClass("Tool") or hitpart:FindFirstAncestorOfClass("Accessory")
- if model then
- if model:FindFirstChild("Humanoid") then
- local diseaseDefence = model:FindFirstChild("DiseaseDefence")
- local hygiene = model:FindFirstChild("Hygiene")
- bindableEvent:Fire(diseaseDefence.Value, tostring(character.Name), infections, hygiene.Value)
- elseif model.Parent:FindFirstChild("Humanoid") then
- if model.Parent:FindFirstChild("Humanoid") then
- local diseaseDefence = model.Parent:FindFirstChild("DiseaseDefence")
- local hygiene = model.Parent:FindFirstChild("Hygiene")
- bindableEvent:Fire(diseaseDefence.Value, tostring(character.Name), infections, hygiene.Value)
- end
- elseif model.Parent.Parent:FindFirstChild("Humanoid") then
- if model.Parent.Parent:FindFirstChild("Humanoid") then
- local diseaseDefence = model.Parent.Parent:FindFirstChild("DiseaseDefence")
- local hygiene = model.Parent.Parent:FindFirstChild("Hygiene")
- bindableEvent:Fire(diseaseDefence.Value, tostring(character.Name), infections, hygiene.Value)
- end
- end
- end
- end
- else
- -- same person
- end
- end
- end
- end
- end