In the past, I have fixed the 2018 and 2013 versions of Kool Killer, and Right now I have been spending some time fixing the 2012 version. Everything in my game is now fully operational and working except for this function that’s supposed to check if the players are dead or alive during a round. I have looked at this script and it doesn’t have any error message so I am pretty stuck. I would appreciate help with this if you can
function CheckFailure()
if script.SurvivorAmmount.Value > 0 then
h.Value = h.Value.." Survivors Left alive: "..script.SurvivorAmmount.Value
elseif script.SurvivorAmmount.Value == 0 then
alldead = true
local sounds = h:GetChildren()
for i = 1,#sounds do
sounds[i]:Stop()
end
h.Value = ""
h.RoundTheme4:Play()
h.Value = "All of the survivors have died."
wait(5)
h.Value = "KOOL KILLER recieves 100 points"
local badgeservice = game:GetService("BadgeService")
if game.Players:findFirstChild(game.Workspace.KOOLKILLER.Value) then
game.Players:findFirstChild(game.Workspace.KOOLKILLER.Value).leaderstats.Points.Value = game.Players:findFirstChild(game.Workspace.KOOLKILLER.Value).leaderstats.Points.Value + 100
game.Players:findFirstChild(game.Workspace.KOOLKILLER.Value).leaderstats.Wins.Value = game.Players:findFirstChild(game.Workspace.KOOLKILLER.Value).leaderstats.Wins.Value + 1
badgeservice:AwardBadge(game.Players:findFirstChild(game.Workspace.KOOLKILLER.Value).userId,60508777)
print("I awarded UserID: "..game.Players:findFirstChild(game.Workspace.KOOLKILLER.Value).userId.." The badge: 60508777 for ''Killing all survivors!''")
end
script.KillCode.Value = true
wait(5)
h.Value = "You tried your best survivors! Now gear up for the next round!"
wait(5)
if game.Players:findFirstChild(game.Workspace.KOOLKILLER.Value) then
game.Players:findFirstChild(game.Workspace.KOOLKILLER.Value).Character.Humanoid.Health = 0
else
print("KOOL KILLER LEFT THE GAME")-- :/
end
local spwns2 = game.Workspace.LobbyReturn:GetChildren()
for i = 1, #people do
local item = math.random(1,#spwns2)
people[i].Character.Torso.CFrame = CFrame.new(spwns2[math.random(1, #spwns2)].Position)
people[i].Character.Head.Transparency = 0
end
for i = 1,100 do
h.Value = "Reloading game: "..i.."%"
wait()
end
if script.SurvivorAmmount.Value == 0 then -- Since the logic of my script apparently doesn't think I'll make it think :P
local trollingStatement = true
if trollingStatement == true then
h.RoundTheme4:Stop()
CleanTheMess()
GameRun()
end
else
error("Game_Main's Logic got stupid :P")
end
end
end