-- ============================================================================ -- SIGMA CONTROL CORE V12.2.4 (BUFF MATRIX EXPANSION HOTFIX) -- ============================================================================ local Players = game:GetService("Players") local UserInputService = game:GetService("UserInputService") local CoreGui = game:GetService("CoreGui") local LocalPlayer = Players.LocalPlayer -- Secure UI Parent Selection local SecureParent = nil if gethui then SecureParent = gethui() elseif cloneref then pcall(function() SecureParent = cloneref(game:GetService("CoreGui")) end) end if not SecureParent then SecureParent = CoreGui:FindFirstChild("RobloxGui") or LocalPlayer:WaitForChild("PlayerGui") end -- ============================================================================ -- MASTER CONFIGURATION & STATE MATRIX -- ============================================================================ local BUFFS = { "buff_advance", "buff_defend", "buff_focus", "buff_elite", "flagbuff", "vanguardbuff" } local state = { EspEnabled = true, EliteKitEspActive = false, HudActive = true, MenuVisible = true, CowboyActive = false, MoraleActive = false, PerkLoopEnabled = false, ActivePerk = nil, PerkSubMenuOpen = false, ChemsSubMenuOpen = false, ActiveChems = { ["inap"] = false, ["syn"] = false, ["mep"] = false, ["hal"] = false, ["hyd"] = false }, BuffsSubMenuOpen = false, ActiveBuffs = {} } -- Initialize active buff states dynamically for _, buffName in ipairs(BUFFS) do state.ActiveBuffs[buffName] = false end local keys = { EspToggle = Enum.KeyCode.RightBracket, EliteKitToggle = Enum.KeyCode.LeftBracket, HudToggle = Enum.KeyCode.P, DashboardToggle = Enum.KeyCode.Quote } local CHEMS_CONTAINER = "chems" local CHEM_VALUE = 1781194520 local CHEM_KEYS = {"inap", "syn", "mep", "hal", "hyd"} local PERKS = { "sprinter", "butcher", "healing", "tunnelrat", "leather", "marksman", "knockdown", "tracker", "vet", "quickdraw" } local currentCharacter = LocalPlayer.Character local lastObservedPerk = nil local wasHoldingPouch = false local activeConnections = {} local playerEspConnections = {} -- Forward declarations for UI elements local bar, fill, hpLabel -- ============================================================================ -- UTILITY LOGIC & DYNAMIC ACCURATE DETECTIONS -- ============================================================================ local function safeDestroy(instance) if instance then pcall(function() instance:Destroy() end) end end local function getUnitType(char) local classVal = char:FindFirstChild("class") if classVal and classVal:IsA("StringValue") and classVal.Value == "dread" then return "Dread" elseif char:FindFirstChild("elitekit") then return "Specialist" end return "Standard" end local function updatePlayerGraveColor(player) if not player or player == LocalPlayer or not state.EspEnabled then return end local char = player.Character if not char then return end local highlight = char:FindFirstChild("GraveVisuals") if not highlight then return end local unitType = getUnitType(char) if unitType == "Dread" then highlight.OutlineColor = Color3.fromRGB(255, 140, 0) elseif unitType == "Specialist" then highlight.OutlineColor = Color3.fromRGB(0, 255, 0) else highlight.OutlineColor = Color3.fromRGB(255, 0, 0) end end local function applyGraveVisuals(player) if player == LocalPlayer or not state.EspEnabled then return end local char = player.Character if not char then return end local hrp = char:FindFirstChild("HumanoidRootPart") if not hrp then return end if player.Team == LocalPlayer.Team then local existing = char:FindFirstChild("GraveVisuals") if existing then existing.Enabled = false end return end local highlight = char:FindFirstChild("GraveVisuals") if not highlight then highlight = Instance.new("Highlight") highlight.Name = "GraveVisuals" highlight.DepthMode = Enum.HighlightDepthMode.AlwaysOnTop highlight.OutlineTransparency = 0.1 highlight.FillTransparency = 1.0 highlight.Parent = char end updatePlayerGraveColor(player) highlight.Enabled = state.EspEnabled end local function adornEliteKit(descendant) if not state.EliteKitEspActive then return end if descendant.Name == "eliteicon" and descendant:IsA("BillboardGui") then local targetPart = descendant.Parent if targetPart and targetPart:IsA("BasePart") and not targetPart:FindFirstChild("ShockESP") then local kitModel = targetPart.Parent if kitModel then local isFirstKit = kitModel.Name:find("_kit1") and not kitModel.Name:find("_kit10") local kitColor = isFirstKit and Color3.fromRGB(0, 255, 0) or Color3.fromRGB(180, 0, 255) local b = Instance.new("BoxHandleAdornment") b.Name = "ShockESP" b.Adornee = targetPart b.AlwaysOnTop = true b.ZIndex = 10 b.Size = targetPart.Size + Vector3.new(0.2, 0.2, 0.2) b.Color3 = kitColor b.Transparency = 0.5 b.Parent = targetPart end end end end local function refreshAllEliteKits() for _, v in ipairs(workspace:GetDescendants()) do adornEliteKit(v) end end local function clearEliteKitESP() for _, v in ipairs(workspace:GetDescendants()) do if v.Name == "ShockESP" then safeDestroy(v) end end end workspace.DescendantAdded:Connect(function(descendant) if state.EliteKitEspActive then adornEliteKit(descendant) end end) -- ============================================================================ -- EVENT-DRIVEN STATE ENFORCEMENT ENGINE -- ============================================================================ local function updateChemicalStatePool() if not currentCharacter then return end local container = currentCharacter:FindFirstChild(CHEMS_CONTAINER) if not container then container = Instance.new("Folder") container.Name = CHEMS_CONTAINER container.Parent = currentCharacter end for _, kName in ipairs(CHEM_KEYS) do if state.ActiveChems[kName] == true then local primary = container:FindFirstChild(kName) if not primary then local newInt = Instance.new("IntValue") newInt.Name = kName newInt.Value = CHEM_VALUE newInt.Parent = container end end end local currentChildren = container:GetChildren() local seenPrimary = {} for i = 1, #currentChildren do local child = currentChildren[i] local cName = child.Name if state.ActiveChems[cName] == true then if not seenPrimary[cName] and child:IsA("IntValue") then seenPrimary[cName] = child else safeDestroy(child) end else safeDestroy(child) end end end local function enforceStaticChemInstance(child) local cName = child.Name if not table.find(CHEM_KEYS, cName) or state.ActiveChems[cName] ~= true then safeDestroy(child) return end if child:IsA("IntValue") then local container = currentCharacter:FindFirstChild(CHEMS_CONTAINER) if container then local matchCount = 0 for _, obj in ipairs(container:GetChildren()) do if obj.Name == cName then matchCount = matchCount + 1 end end if matchCount > 1 then safeDestroy(child) return end end else safeDestroy(child) end end -- Write-Once Buff Synchronization Matrix (Handles StringValue Creation for all Buffs) local function updateBuffStatePool() if not currentCharacter then return end for _, buffName in ipairs(BUFFS) do local isEnabled = state.ActiveBuffs[buffName] local primary = currentCharacter:FindFirstChild(buffName) if isEnabled then if not primary then local obj = Instance.new("StringValue") obj.Name = buffName obj.Value = "true" obj.Parent = currentCharacter end if currentCharacter:GetAttribute(buffName) ~= true then pcall(function() currentCharacter:SetAttribute(buffName, true) end) end else if primary then safeDestroy(primary) end if currentCharacter:GetAttribute(buffName) ~= nil then pcall(function() currentCharacter:SetAttribute(buffName, nil) end) end end end end local function updateCowboyState() if not currentCharacter then return end local cb = currentCharacter:FindFirstChild("cowboy") if state.CowboyActive then if not cb then local obj = Instance.new("BoolValue") obj.Name = "cowboy" obj.Value = true obj.Parent = currentCharacter end if currentCharacter:GetAttribute("cowboy") ~= true then pcall(function() currentCharacter:SetAttribute("cowboy", true) end) end else if cb then safeDestroy(cb) end if currentCharacter:GetAttribute("cowboy") ~= nil then pcall(function() currentCharacter:SetAttribute("cowboy", nil) end) end end end local function updateMoraleState() if not currentCharacter then return end local morale = currentCharacter:FindFirstChild("morale") if state.MoraleActive then if not morale then local m = Instance.new("BoolValue") m.Name = "morale" m.Value = true m.Parent = currentCharacter end else if morale then safeDestroy(morale) end end end local function enforceTargetPerk(perkName) if not currentCharacter or not perkName then return end local pObj = currentCharacter:FindFirstChild("perk") if not pObj then pcall(function() local obj = Instance.new("StringValue") obj.Name = "perk" obj.Value = perkName obj.Parent = currentCharacter end) else if pObj.Value ~= perkName then pObj.Value = perkName end end end local function checkPerkLogicMatrix() if not currentCharacter then return end local hasPouch = currentCharacter:FindFirstChild("First Aid Pouch") ~= nil if hasPouch then wasHoldingPouch = true enforceTargetPerk("healing") else wasHoldingPouch = false if state.PerkLoopEnabled and state.ActivePerk then enforceTargetPerk(state.ActivePerk) elseif lastObservedPerk then enforceTargetPerk(lastObservedPerk) end end end -- ============================================================================ -- LIFECYCLE MANAGEMENT -- ============================================================================ local function disconnectLifecycleListeners() for key, conn in pairs(activeConnections) do if conn then conn:Disconnect() activeConnections[key] = nil end end wasHoldingPouch = false lastObservedPerk = nil end local function buildLifecycleListeners(char) disconnectLifecycleListeners() if not char then return end currentCharacter = char local container = char:WaitForChild(CHEMS_CONTAINER, 3) or char:FindFirstChild(CHEMS_CONTAINER) if not container then container = Instance.new("Folder") container.Name = CHEMS_CONTAINER container.Parent = char end activeConnections.chemsChildAdded = container.ChildAdded:Connect(enforceStaticChemInstance) updateChemicalStatePool() updateBuffStatePool() updateCowboyState() updateMoraleState() local initialPerk = char:FindFirstChild("perk") if initialPerk and initialPerk.Value ~= "healing" then lastObservedPerk = initialPerk.Value end activeConnections.perkChanged = char.ChildAdded:Connect(function(child) if child.Name == "perk" and child:IsA("StringValue") then if child.Value ~= "healing" and not char:FindFirstChild("First Aid Pouch") then lastObservedPerk = child.Value end child.Changed:Connect(function(newVal) if newVal ~= "healing" and not char:FindFirstChild("First Aid Pouch") then lastObservedPerk = newVal end end) end end) activeConnections.pouchAdded = char.ChildAdded:Connect(function(child) if child.Name == "First Aid Pouch" then checkPerkLogicMatrix() end end) activeConnections.pouchRemoved = char.ChildRemoved:Connect(function(child) if child.Name == "First Aid Pouch" then checkPerkLogicMatrix() end end) checkPerkLogicMatrix() local hum = char:WaitForChild("Humanoid", 3) if hum then if activeConnections.healthConn then activeConnections.healthConn:Disconnect() end local function syncHealthUI() if not state.HudActive or hum.Health <= 0 then bar.Visible = false return end bar.Visible = true local hp = math.floor(hum.Health) local ratio = math.clamp(hum.Health / hum.MaxHealth, 0, 1) fill.Size = UDim2.new(ratio, 0, 1, 0) hpLabel.Text = tostring(hp) if ratio > 0.75 then fill.BackgroundColor3 = Color3.fromRGB(255, 255, 255) elseif ratio > 0.50 then fill.BackgroundColor3 = Color3.fromRGB(255, 170, 0) else fill.BackgroundColor3 = Color3.fromRGB(255, 0, 0) end end activeConnections.healthConn = hum.HealthChanged:Connect(syncHealthUI) syncHealthUI() end end local function trackPlayerESP(player) if player == LocalPlayer then return end if playerEspConnections[player] then for _, conn in pairs(playerEspConnections[player]) do conn:Disconnect() end end playerEspConnections[player] = {} local function setupCharEvents(char) char:WaitForChild("HumanoidRootPart", 5) applyGraveVisuals(player) local childAdd = char.ChildAdded:Connect(function(child) if child.Name == "elitekit" or child.Name == "class" or child.Name == "dread" then task.wait(0.1) updatePlayerGraveColor(player) end end) local childRem = char.ChildRemoved:Connect(function(child) if child.Name == "elitekit" or child.Name == "class" or child.Name == "dread" then task.wait(0.1) updatePlayerGraveColor(player) end end) table.insert(playerEspConnections[player], childAdd) table.insert(playerEspConnections[player], childRem) end if player.Character then setupCharEvents(player.Character) end local charConn = player.CharacterAdded:Connect(setupCharEvents) table.insert(playerEspConnections[player], charConn) end for _, p in ipairs(Players:GetPlayers()) do trackPlayerESP(p) end Players.PlayerAdded:Connect(trackPlayerESP) Players.PlayerRemoving:Connect(function(p) if playerEspConnections[p] then for _, conn in pairs(playerEspConnections[p]) do conn:Disconnect() end playerEspConnections[p] = nil end end) -- ============================================================================ -- SCREEN DISPLAY INITIALIZATION -- ============================================================================ local screenGui = Instance.new("ScreenGui") screenGui.Name = "SigmaSuiteDashboard_v12" screenGui.IgnoreGuiInset = true screenGui.ResetOnSpawn = false screenGui.Parent = SecureParent bar = Instance.new("Frame", screenGui) bar.Size = UDim2.new(0, 200, 0, 4) bar.Position = UDim2.new(0.5, -100, 0.78, 0) bar.BackgroundColor3 = Color3.fromRGB(0, 0, 0) bar.BackgroundTransparency = 0.6 bar.BorderSizePixel = 0 bar.Visible = false fill = Instance.new("Frame", bar) fill.Size = UDim2.new(1, 0, 1, 0) fill.BackgroundColor3 = Color3.fromRGB(255, 255, 255) fill.BorderSizePixel = 0 hpLabel = Instance.new("TextLabel", bar) hpLabel.Size = UDim2.new(0, 40, 0, 20) hpLabel.Position = UDim2.new(1, 5, 0.5, -10) hpLabel.BackgroundTransparency = 1 hpLabel.TextColor3 = Color3.fromRGB(255, 255, 255) hpLabel.TextSize = 13 hpLabel.Font = Enum.Font.RobotoMono hpLabel.TextXAlignment = Enum.TextXAlignment.Left hpLabel.Text = "100" hpLabel.TextStrokeTransparency = 0.8 local DynamicButtonStack = Instance.new("Frame", screenGui) DynamicButtonStack.Size = UDim2.new(0, 70, 0, 430) DynamicButtonStack.Position = UDim2.new(0.015, 0, 0.25, 0) DynamicButtonStack.BackgroundTransparency = 1 DynamicButtonStack.Active = true local StackLayout = Instance.new("UIListLayout", DynamicButtonStack) StackLayout.Padding = UDim.new(0, 12) StackLayout.SortOrder = Enum.SortOrder.LayoutOrder local function createCircularButton(name, parent, text) local btn = Instance.new("TextButton", parent) btn.Name = name .. "_CircleBtn" btn.Size = UDim2.new(0, 56, 0, 56) btn.BackgroundColor3 = Color3.fromRGB(24, 28, 26) btn.BackgroundTransparency = 0.15 btn.BorderSizePixel = 0 btn.Font = Enum.Font.SourceSansBold btn.TextSize = 13 btn.TextColor3 = Color3.fromRGB(200, 205, 200) btn.Text = text local corner = Instance.new("UICorner", btn) corner.CornerRadius = UDim.new(1, 0) local stroke = Instance.new("UIStroke", btn) stroke.Thickness = 1.5 stroke.Color = Color3.fromRGB(35, 42, 38) return btn end local cowboyBtn = createCircularButton("Cowboy", DynamicButtonStack, "Cowboy") local function updateCowboyVisuals() if state.CowboyActive then cowboyBtn.BackgroundColor3 = Color3.fromRGB(115, 75, 45) cowboyBtn.TextColor3 = Color3.fromRGB(245, 220, 195) cowboyBtn.UIStroke.Color = Color3.fromRGB(165, 110, 65) else cowboyBtn.BackgroundColor3 = Color3.fromRGB(24, 28, 26) cowboyBtn.TextColor3 = Color3.fromRGB(150, 160, 155) cowboyBtn.UIStroke.Color = Color3.fromRGB(35, 42, 38) end end cowboyBtn.MouseButton1Click:Connect(function() state.CowboyActive = not state.CowboyActive updateCowboyState() updateCowboyVisuals() end) local moraleBtn = createCircularButton("Morale", DynamicButtonStack, "M") moraleBtn.TextSize = 16 local function updateMoraleVisuals() if state.MoraleActive then moraleBtn.BackgroundColor3 = Color3.fromRGB(20, 80, 85) moraleBtn.TextColor3 = Color3.fromRGB(100, 240, 245) moraleBtn.UIStroke.Color = Color3.fromRGB(40, 175, 185) else moraleBtn.BackgroundColor3 = Color3.fromRGB(24, 28, 26) moraleBtn.TextColor3 = Color3.fromRGB(150, 160, 155) moraleBtn.UIStroke.Color = Color3.fromRGB(35, 42, 38) end end moraleBtn.MouseButton1Click:Connect(function() state.MoraleActive = not state.MoraleActive updateMoraleState() updateMoraleVisuals() end) local chemsMasterBtn = createCircularButton("ChemsMaster", DynamicButtonStack, "C") chemsMasterBtn.TextSize = 16 local ChemsGridFrame = Instance.new("Frame", screenGui) ChemsGridFrame.Size = UDim2.new(0, 250, 0, 100) ChemsGridFrame.Position = UDim2.new(0.065, 0, 0.45, 0) ChemsGridFrame.BackgroundTransparency = 1 ChemsGridFrame.Visible = false local ChemsGridLayout = Instance.new("UIGridLayout", ChemsGridFrame) ChemsGridLayout.CellSize = UDim2.new(0, 76, 0, 32) ChemsGridLayout.CellPadding = UDim2.new(0, 6, 0, 6) local chemButtons = {} local function updateChemSelectionVisuals() local anyActive = false for _, enabled in pairs(state.ActiveChems) do if enabled then anyActive = true break end end if anyActive then chemsMasterBtn.BackgroundColor3 = Color3.fromRGB(30, 60, 85) chemsMasterBtn.TextColor3 = Color3.fromRGB(100, 190, 255) chemsMasterBtn.UIStroke.Color = Color3.fromRGB(60, 130, 190) else chemsMasterBtn.BackgroundColor3 = Color3.fromRGB(24, 28, 26) chemsMasterBtn.TextColor3 = Color3.fromRGB(150, 160, 155) chemsMasterBtn.UIStroke.Color = Color3.fromRGB(35, 42, 38) end for cName, btn in pairs(chemButtons) do if state.ActiveChems[cName] then btn.BackgroundColor3 = Color3.fromRGB(45, 95, 155) btn.TextColor3 = Color3.fromRGB(255, 255, 255) else btn.BackgroundColor3 = Color3.fromRGB(22, 24, 26) btn.TextColor3 = Color3.fromRGB(140, 145, 150) end end end chemsMasterBtn.MouseButton1Click:Connect(function() state.ChemsSubMenuOpen = not state.ChemsSubMenuOpen ChemsGridFrame.Visible = state.ChemsSubMenuOpen end) for _, chemName in ipairs(CHEM_KEYS) do local cBtn = Instance.new("TextButton", ChemsGridFrame) cBtn.Font = Enum.Font.SourceSansBold cBtn.TextSize = 11 cBtn.Text = chemName:upper() cBtn.BorderSizePixel = 0 Instance.new("UICorner", cBtn).CornerRadius = UDim.new(0, 4) local s = Instance.new("UIStroke", cBtn) s.Thickness = 1 s.Color = Color3.fromRGB(45, 48, 52) chemButtons[chemName] = cBtn cBtn.MouseButton1Click:Connect(function() state.ActiveChems[chemName] = not state.ActiveChems[chemName] updateChemicalStatePool() updateChemSelectionVisuals() end) end local buffsMasterBtn = createCircularButton("BuffsMaster", DynamicButtonStack, "B") buffsMasterBtn.TextSize = 16 local BuffsGridFrame = Instance.new("Frame", screenGui) BuffsGridFrame.Size = UDim2.new(0, 250, 0, 140) -- Resized to fit expanded buff list BuffsGridFrame.Position = UDim2.new(0.065, 0, 0.54, 0) BuffsGridFrame.BackgroundTransparency = 1 BuffsGridFrame.Visible = false local BuffsGridLayout = Instance.new("UIGridLayout", BuffsGridFrame) BuffsGridLayout.CellSize = UDim2.new(0, 115, 0, 32) BuffsGridLayout.CellPadding = UDim2.new(0, 8, 0, 8) local buffButtons = {} local function updateBuffSelectionVisuals() local anyActive = false for _, enabled in pairs(state.ActiveBuffs) do if enabled then anyActive = true break end end if anyActive then buffsMasterBtn.BackgroundColor3 = Color3.fromRGB(35, 55, 45) buffsMasterBtn.TextColor3 = Color3.fromRGB(110, 230, 150) buffsMasterBtn.UIStroke.Color = Color3.fromRGB(60, 140, 90) else buffsMasterBtn.BackgroundColor3 = Color3.fromRGB(24, 28, 26) buffsMasterBtn.TextColor3 = Color3.fromRGB(150, 160, 155) buffsMasterBtn.UIStroke.Color = Color3.fromRGB(35, 42, 38) end for _, name in ipairs(BUFFS) do local btn = buffButtons[name] if btn then local cleanName = name:gsub("buff_", ""):upper() if state.ActiveBuffs[name] then btn.BackgroundColor3 = Color3.fromRGB(46, 117, 89) btn.TextColor3 = Color3.fromRGB(255, 255, 255) btn.Text = cleanName else btn.BackgroundColor3 = Color3.fromRGB(22, 24, 26) btn.TextColor3 = Color3.fromRGB(140, 145, 150) btn.Text = cleanName:lower() end end end end buffsMasterBtn.MouseButton1Click:Connect(function() state.BuffsSubMenuOpen = not state.BuffsSubMenuOpen BuffsGridFrame.Visible = state.BuffsSubMenuOpen end) for i, buffName in ipairs(BUFFS) do local bBtn = Instance.new("TextButton", BuffsGridFrame) bBtn.Font = Enum.Font.SourceSansBold bBtn.TextSize = 13 bBtn.BorderSizePixel = 0 bBtn.LayoutOrder = i Instance.new("UICorner", bBtn).CornerRadius = UDim.new(0, 4) local s = Instance.new("UIStroke", bBtn) s.Thickness = 1 s.Color = Color3.fromRGB(40, 48, 44) buffButtons[buffName] = bBtn bBtn.MouseButton1Click:Connect(function() state.ActiveBuffs[buffName] = not state.ActiveBuffs[buffName] updateBuffStatePool() updateBuffSelectionVisuals() end) end local perkMasterBtn = createCircularButton("PerksMaster", DynamicButtonStack, "P") perkMasterBtn.TextSize = 16 local PerkGridFrame = Instance.new("Frame", screenGui) PerkGridFrame.Size = UDim2.new(0, 250, 0, 140) PerkGridFrame.Position = UDim2.new(0.065, 0, 0.63, 0) PerkGridFrame.BackgroundTransparency = 1 PerkGridFrame.Visible = false local PerkGridLayout = Instance.new("UIGridLayout", PerkGridFrame) PerkGridLayout.CellSize = UDim2.new(0, 76, 0, 32) PerkGridLayout.CellPadding = UDim2.new(0, 6, 0, 6) local perkButtons = {} local function updatePerkSelectionVisuals() if state.PerkLoopEnabled and state.ActivePerk then perkMasterBtn.BackgroundColor3 = Color3.fromRGB(55, 35, 75) perkMasterBtn.TextColor3 = Color3.fromRGB(220, 190, 250) perkMasterBtn.UIStroke.Color = Color3.fromRGB(120, 80, 170) else perkMasterBtn.BackgroundColor3 = Color3.fromRGB(24, 28, 26) perkMasterBtn.TextColor3 = Color3.fromRGB(150, 160, 155) perkMasterBtn.UIStroke.Color = Color3.fromRGB(35, 42, 38) end for pName, btn in pairs(perkButtons) do if state.ActivePerk == pName and state.PerkLoopEnabled then btn.BackgroundColor3 = Color3.fromRGB(75, 45, 115) btn.TextColor3 = Color3.fromRGB(255, 255, 255) else btn.BackgroundColor3 = Color3.fromRGB(22, 24, 26) btn.TextColor3 = Color3.fromRGB(140, 145, 150) end end end perkMasterBtn.MouseButton1Click:Connect(function() state.PerkSubMenuOpen = not state.PerkSubMenuOpen PerkGridFrame.Visible = state.PerkSubMenuOpen end) for _, perkName in ipairs(PERKS) do local pBtn = Instance.new("TextButton", PerkGridFrame) pBtn.Font = Enum.Font.SourceSansBold pBtn.TextSize = 11 pBtn.Text = perkName:upper() pBtn.BorderSizePixel = 0 Instance.new("UICorner", pBtn).CornerRadius = UDim.new(0, 4) local s = Instance.new("UIStroke", pBtn) s.Thickness = 1 s.Color = Color3.fromRGB(45, 48, 52) perkButtons[perkName] = pBtn pBtn.MouseButton1Click:Connect(function() if state.ActivePerk == perkName and state.PerkLoopEnabled then state.ActivePerk = nil state.PerkLoopEnabled = false else state.ActivePerk = perkName state.PerkLoopEnabled = true end checkPerkLogicMatrix() updatePerkSelectionVisuals() end) end -- Initialize UI Elements updateCowboyVisuals() updateMoraleVisuals() updateChemSelectionVisuals() updateBuffSelectionVisuals() updatePerkSelectionVisuals() -- Dynamic Input Keycode Bindings UserInputService.InputBegan:Connect(function(input, processed) if processed then return end if input.KeyCode == keys.EspToggle then state.EspEnabled = not state.EspEnabled for _, p in ipairs(Players:GetPlayers()) do if p.Character then applyGraveVisuals(p) end end elseif input.KeyCode == keys.EliteKitToggle then state.EliteKitEspActive = not state.EliteKitEspActive if state.EliteKitEspActive then refreshAllEliteKits() else clearEliteKitESP() end elseif input.KeyCode == keys.HudToggle then state.HudActive = not state.HudActive if currentCharacter and currentCharacter:FindFirstChildOfClass("Humanoid") then bar.Visible = state.HudActive end elseif input.KeyCode == keys.DashboardToggle then state.MenuVisible = not state.MenuVisible DynamicButtonStack.Visible = state.MenuVisible if not state.MenuVisible then PerkGridFrame.Visible = false ChemsGridFrame.Visible = false BuffsGridFrame.Visible = false state.PerkSubMenuOpen = false state.ChemsSubMenuOpen = false state.BuffsSubMenuOpen = false else PerkGridFrame.Visible = state.PerkSubMenuOpen ChemsGridFrame.Visible = state.ChemsSubMenuOpen BuffsGridFrame.Visible = state.BuffsSubMenuOpen end end end) -- Character Event Initialization if LocalPlayer.Character then buildLifecycleListeners(LocalPlayer.Character) end LocalPlayer.CharacterAdded:Connect(buildLifecycleListeners) LocalPlayer.CharacterRemoving:Connect(disconnectLifecycleListeners) print("--- SIGMA CORE V12.2.4: FLAGBUFF & VANGUARDBUFF ADDED ---")