local Players = game:GetService("Players") local UserInputService = game:GetService("UserInputService") local Workspace = game:GetService("Workspace") local StarterGui = game:GetService("StarterGui") local HttpService = game:GetService("HttpService") local TeleportService = game:GetService("TeleportService") local LocalPlayer = Players.LocalPlayer local CONFIG_FILE_NAME = "TraitDebuggerConfig.json" local function saveSettings(data) local jsonString = HttpService:JSONEncode(data) if writefile then pcall(function() writefile(CONFIG_FILE_NAME, jsonString) end) end pcall(function() TeleportService:SetTeleportSetting("TraitDebuggerConfig", jsonString) end) end local function loadSettings() local rawData = nil if readfile and isfile and isfile(CONFIG_FILE_NAME) then pcall(function() rawData = readfile(CONFIG_FILE_NAME) end) end if not rawData then pcall(function() rawData = TeleportService:GetTeleportSetting("TraitDebuggerConfig") end) end if rawData then local success, decoded = pcall(function() return HttpService:JSONDecode(rawData) end) if success and type(decoded) == "table" then return decoded end end return nil end local workbenchEspEnabled = true local WORKBENCH_COLOR = Color3.fromRGB(0, 255, 150) local WORKBENCH_HL_NAME = "WorkbenchESP" local leaderboardVisible = true local function setLeaderboardState(state) leaderboardVisible = state pcall(function() StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.PlayerList, leaderboardVisible) end) end local function purgeCustomLeaderboards() local playerGui = LocalPlayer:FindFirstChild("PlayerGui") if not playerGui then return end local commonLeaderboardNames = {"leaderboard", "playerlist", "tabmenu", "scoreboard"} for _, ui in ipairs(playerGui:GetChildren()) do local lowerName = string.lower(ui.Name) for _, targetName in ipairs(commonLeaderboardNames) do if string.find(lowerName, targetName) then ui:Destroy() break end end end end local playerGui = LocalPlayer:WaitForChild("PlayerGui") playerGui.ChildAdded:Connect(function() if not leaderboardVisible then purgeCustomLeaderboards() end end) local function clearWorkbenchHighlights() for _, desc in ipairs(Workspace:GetDescendants()) do if desc:IsA("Highlight") and desc.Name == WORKBENCH_HL_NAME then desc:Destroy() end end end local function applyWorkbenchHighlight(obj) if not workbenchEspEnabled then return end if obj.Name == "Workbench" and not obj:FindFirstChild(WORKBENCH_HL_NAME) then local hl = Instance.new("Highlight") hl.Name = WORKBENCH_HL_NAME hl.Adornee = obj hl.FillColor = WORKBENCH_COLOR hl.OutlineColor = Color3.fromRGB(255, 255, 255) hl.FillTransparency = 0.4 hl.OutlineTransparency = 0 hl.DepthMode = Enum.HighlightDepthMode.AlwaysOnTop hl.Parent = obj end end local function refreshWorkbenchESP() clearWorkbenchHighlights() if not workbenchEspEnabled then return end for _, desc in ipairs(Workspace:GetDescendants()) do applyWorkbenchHighlight(desc) end end Workspace.DescendantAdded:Connect(function(desc) if desc.Name == "Workbench" then task.wait(0.1) applyWorkbenchHighlight(desc) end end) local traitCategories = { { title = "MELEE TRAITS", traits = { {id = "rustic", name = "Methodical", desc = "+15% melee damage"}, {id = "manic", name = "Manic", desc = "+45% heavy swing speed"}, {id = "boxer", name = "Aggressive Behavior", desc = "+25% fist damage & faster shove"}, {id = "violence", name = "Violent Tendencies", desc = "+45% light swing speed"}, {id = "honor", name = "Honourable", desc = "2x fist damage"} } }, { title = "GUN TRAITS", traits = { {id = "recoil", name = "Professional", desc = "Reduced sway & -65% recoil"}, {id = "hip", name = "Lone Wolf", desc = "+65% hipfire speed, +50% lever/revolver ROF"}, {id = "reliab", name = "Reliable", desc = "+65% reload speed"}, {id = "paranoia", name = "Paranoid", desc = "+50% semi-auto ROF"} } }, { title = "DEFENSIVE TRAITS", traits = { {id = "regen", name = "Survivor", desc = "+6 HP/min passive regen"} } }, { title = "UTILITY & MOBILITY", traits = { {id = "second", name = "Relentless", desc = "Increased stamina regen"}, {id = "leg", name = "Impatient", desc = "+15% movement speed"}, {id = "lungs", name = "Calm", desc = "+75 stamina"} } } } local savedTraits = {} for _, cat in ipairs(traitCategories) do for _, traitData in ipairs(cat.traits) do savedTraits[traitData.id] = false end end local savedUiPosition = {XScale = 0, XOffset = 30, YScale = 0.5, YOffset = -255} local savedUiVisible = true local loadedConfig = loadSettings() if loadedConfig then if loadedConfig.traits then for traitId, state in pairs(loadedConfig.traits) do if savedTraits[traitId] ~= nil then savedTraits[traitId] = state end end end if loadedConfig.workbenchEsp ~= nil then workbenchEspEnabled = loadedConfig.workbenchEsp end if loadedConfig.leaderboard ~= nil then leaderboardVisible = loadedConfig.leaderboard end if loadedConfig.uiPosition then savedUiPosition = loadedConfig.uiPosition end if loadedConfig.uiVisible ~= nil then savedUiVisible = loadedConfig.uiVisible end end local function persistCurrentState(mainFrame) local pos = mainFrame and mainFrame.Position or UDim2.new(savedUiPosition.XScale, savedUiPosition.XOffset, savedUiPosition.YScale, savedUiPosition.YOffset) local isVis = mainFrame and mainFrame.Visible or savedUiVisible saveSettings({ traits = savedTraits, workbenchEsp = workbenchEspEnabled, leaderboard = leaderboardVisible, uiPosition = { XScale = pos.X.Scale, XOffset = pos.X.Offset, YScale = pos.Y.Scale, YOffset = pos.Y.Offset }, uiVisible = isVis }) end local function getPlayerCharacterModel() local activePlayers = Workspace:FindFirstChild("activePlayers") if not activePlayers then return nil end return activePlayers:FindFirstChild(LocalPlayer.Name) end local function getPerksFolder() local char = getPlayerCharacterModel() if not char then return nil end local perksFolder = char:FindFirstChild("perks") if not perksFolder then perksFolder = Instance.new("Folder") perksFolder.Name = "perks" perksFolder.Parent = char end return perksFolder end local screenGui = Instance.new("ScreenGui") screenGui.Name = "TraitDebuggerPanel" screenGui.ResetOnSpawn = false screenGui.Parent = playerGui local mainFrame = Instance.new("Frame") mainFrame.Name = "MainFrame" mainFrame.Size = UDim2.new(0, 320, 0, 510) mainFrame.Position = UDim2.new(savedUiPosition.XScale, savedUiPosition.XOffset, savedUiPosition.YScale, savedUiPosition.YOffset) mainFrame.BackgroundColor3 = Color3.fromRGB(18, 18, 22) mainFrame.BorderSizePixel = 0 mainFrame.Visible = savedUiVisible mainFrame.Parent = screenGui local mainCorner = Instance.new("UICorner") mainCorner.CornerRadius = UDim.new(0, 8) mainCorner.Parent = mainFrame local mainStroke = Instance.new("UIStroke") mainStroke.Color = Color3.fromRGB(45, 45, 55) mainStroke.Thickness = 1 mainStroke.Parent = mainFrame local titleBar = Instance.new("Frame") titleBar.Name = "TitleBar" titleBar.Size = UDim2.new(1, 0, 0, 40) titleBar.BackgroundColor3 = Color3.fromRGB(26, 26, 32) titleBar.BorderSizePixel = 0 titleBar.Parent = mainFrame local titleText = Instance.new("TextLabel") titleText.Size = UDim2.new(1, -110, 1, 0) titleText.Position = UDim2.new(0, 12, 0, 0) titleText.BackgroundTransparency = 1 titleText.Text = "TRAIT DEBUGGER" titleText.TextColor3 = Color3.fromRGB(220, 220, 230) titleText.Font = Enum.Font.GothamBold titleText.TextSize = 12 titleText.TextXAlignment = Enum.TextXAlignment.Left titleText.Parent = titleBar local toggleAllBtn = Instance.new("TextButton") toggleAllBtn.Name = "ToggleAllButton" toggleAllBtn.Size = UDim2.new(0, 85, 0, 24) toggleAllBtn.Position = UDim2.new(1, -93, 0.5, -12) toggleAllBtn.BackgroundColor3 = Color3.fromRGB(38, 38, 48) toggleAllBtn.Text = "ENABLE ALL" toggleAllBtn.TextColor3 = Color3.fromRGB(200, 200, 215) toggleAllBtn.Font = Enum.Font.GothamBold toggleAllBtn.TextSize = 10 toggleAllBtn.AutoButtonColor = false toggleAllBtn.Parent = titleBar local controlBar = Instance.new("Frame") controlBar.Name = "ControlBar" controlBar.Size = UDim2.new(1, -16, 0, 28) controlBar.Position = UDim2.new(0, 8, 0, 44) controlBar.BackgroundColor3 = Color3.fromRGB(24, 24, 30) controlBar.BorderSizePixel = 0 controlBar.Parent = mainFrame local controlCorner = Instance.new("UICorner") controlCorner.CornerRadius = UDim.new(0, 6) controlCorner.Parent = controlBar local wbToggleBtn = Instance.new("TextButton") wbToggleBtn.Name = "WBToggleButton" wbToggleBtn.Size = UDim2.new(0.48, 0, 1, -4) wbToggleBtn.Position = UDim2.new(0, 2, 0, 2) wbToggleBtn.BackgroundColor3 = workbenchEspEnabled and Color3.fromRGB(38, 120, 65) or Color3.fromRGB(120, 40, 45) wbToggleBtn.Text = workbenchEspEnabled and "WORKBENCH ESP: ON" or "WORKBENCH ESP: OFF" wbToggleBtn.TextColor3 = Color3.fromRGB(220, 250, 230) wbToggleBtn.Font = Enum.Font.GothamBold wbToggleBtn.TextSize = 9 wbToggleBtn.Parent = controlBar local lbToggleBtn = Instance.new("TextButton") lbToggleBtn.Name = "LBToggleButton" lbToggleBtn.Size = UDim2.new(0.48, 0, 1, -4) lbToggleBtn.Position = UDim2.new(0.52, 0, 0, 2) lbToggleBtn.BackgroundColor3 = leaderboardVisible and Color3.fromRGB(38, 120, 65) or Color3.fromRGB(120, 40, 45) lbToggleBtn.Text = leaderboardVisible and "LEADERBOARD: ON" or "LEADERBOARD: OFF" lbToggleBtn.TextColor3 = Color3.fromRGB(220, 250, 230) lbToggleBtn.Font = Enum.Font.GothamBold lbToggleBtn.TextSize = 9 lbToggleBtn.Parent = controlBar local scroll = Instance.new("ScrollingFrame") scroll.Name = "MainList" scroll.Size = UDim2.new(1, -16, 1, -82) scroll.Position = UDim2.new(0, 8, 0, 76) scroll.BackgroundTransparency = 1 scroll.BorderSizePixel = 0 scroll.ScrollBarThickness = 4 scroll.ScrollBarImageColor3 = Color3.fromRGB(60, 60, 75) scroll.Parent = mainFrame local listLayout = Instance.new("UIListLayout") listLayout.Parent = scroll listLayout.SortOrder = Enum.SortOrder.LayoutOrder listLayout.Padding = UDim.new(0, 6) listLayout:GetPropertyChangedSignal("AbsoluteContentSize"):Connect(function() scroll.CanvasSize = UDim2.new(0, 0, 0, listLayout.AbsoluteContentSize.Y + 16) end) local dragging, dragInput, dragStart, startPos titleBar.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then dragging = true dragStart = input.Position startPos = mainFrame.Position input.Changed:Connect(function() if input.UserInputState == Enum.UserInputState.End then dragging = false persistCurrentState(mainFrame) end end) end end) titleBar.InputChanged:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then dragInput = input end end) UserInputService.InputChanged:Connect(function(input) if input == dragInput and dragging then local delta = input.Position - dragStart mainFrame.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y) end end) UserInputService.InputBegan:Connect(function(input, gameProcessed) if gameProcessed then return end if input.KeyCode == Enum.KeyCode.RightBracket then mainFrame.Visible = not mainFrame.Visible persistCurrentState(mainFrame) end end) local traitUI = {} local layoutCounter = 0 local function updateUI() local perksFolder = getPerksFolder() local allTraitsActive = true for traitId, uiGroup in pairs(traitUI) do local valueName = "trait:" .. traitId local existsInGame = perksFolder and perksFolder:FindFirstChild(valueName) local isActive = savedTraits[traitId] or (existsInGame ~= nil) if isActive then uiGroup.Card.BackgroundColor3 = Color3.fromRGB(32, 50, 38) uiGroup.Stroke.Color = Color3.fromRGB(55, 120, 75) uiGroup.Badge.Text = "ACTIVE" uiGroup.Badge.TextColor3 = Color3.fromRGB(80, 220, 120) else uiGroup.Card.BackgroundColor3 = Color3.fromRGB(24, 24, 30) uiGroup.Stroke.Color = Color3.fromRGB(38, 38, 48) uiGroup.Badge.Text = "INACTIVE" uiGroup.Badge.TextColor3 = Color3.fromRGB(120, 120, 135) allTraitsActive = false end end if allTraitsActive then toggleAllBtn.Text = "DISABLE ALL" toggleAllBtn.BackgroundColor3 = Color3.fromRGB(50, 32, 32) toggleAllBtn.TextColor3 = Color3.fromRGB(220, 120, 120) else toggleAllBtn.Text = "ENABLE ALL" toggleAllBtn.BackgroundColor3 = Color3.fromRGB(38, 38, 48) toggleAllBtn.TextColor3 = Color3.fromRGB(200, 200, 215) end end local function applyStateToFolder() local perksFolder = getPerksFolder() if not perksFolder then return false end local noneVal = perksFolder:FindFirstChild("trait:none") if noneVal then noneVal:Destroy() end for traitId, isEnabled in pairs(savedTraits) do local valueName = "trait:" .. traitId local existingVal = perksFolder:FindFirstChild(valueName) if isEnabled and not existingVal then local boolVal = Instance.new("BoolValue") boolVal.Name = valueName boolVal.Value = false boolVal.Parent = perksFolder elseif not isEnabled and existingVal then existingVal:Destroy() end end return true end for _, categoryData in ipairs(traitCategories) do layoutCounter = layoutCounter + 1 local headerLabel = Instance.new("TextLabel") headerLabel.Size = UDim2.new(1, 0, 0, 20) headerLabel.BackgroundTransparency = 1 headerLabel.Text = categoryData.title headerLabel.TextColor3 = Color3.fromRGB(160, 160, 180) headerLabel.Font = Enum.Font.GothamBold headerLabel.TextSize = 10 headerLabel.TextXAlignment = Enum.TextXAlignment.Left headerLabel.LayoutOrder = layoutCounter headerLabel.Parent = scroll for _, traitData in ipairs(categoryData.traits) do layoutCounter = layoutCounter + 1 local traitId = traitData.id local card = Instance.new("TextButton") card.Size = UDim2.new(1, -6, 0, 48) card.BackgroundColor3 = Color3.fromRGB(24, 24, 30) card.AutoButtonColor = false card.Text = "" card.LayoutOrder = layoutCounter card.Parent = scroll local cardCorner = Instance.new("UICorner") cardCorner.CornerRadius = UDim.new(0, 6) cardCorner.Parent = card local cardStroke = Instance.new("UIStroke") cardStroke.Color = Color3.fromRGB(38, 38, 48) cardStroke.Thickness = 1 cardStroke.Parent = card local nameLabel = Instance.new("TextLabel") nameLabel.Size = UDim2.new(1, -80, 0, 20) nameLabel.Position = UDim2.new(0, 10, 0, 6) nameLabel.BackgroundTransparency = 1 nameLabel.Text = traitData.name nameLabel.TextColor3 = Color3.fromRGB(240, 240, 245) nameLabel.Font = Enum.Font.GothamMedium nameLabel.TextSize = 13 nameLabel.TextXAlignment = Enum.TextXAlignment.Left nameLabel.Parent = card local descLabel = Instance.new("TextLabel") descLabel.Size = UDim2.new(1, -80, 0, 16) descLabel.Position = UDim2.new(0, 10, 0, 26) descLabel.BackgroundTransparency = 1 descLabel.Text = traitData.desc descLabel.TextColor3 = Color3.fromRGB(140, 140, 155) descLabel.Font = Enum.Font.Gotham descLabel.TextSize = 11 descLabel.TextXAlignment = Enum.TextXAlignment.Left descLabel.Parent = card local badge = Instance.new("TextLabel") badge.Size = UDim2.new(0, 65, 0, 20) badge.Position = UDim2.new(1, -73, 0.5, -10) badge.BackgroundTransparency = 1 badge.Text = "INACTIVE" badge.TextColor3 = Color3.fromRGB(120, 120, 135) badge.Font = Enum.Font.GothamBold badge.TextSize = 10 badge.TextXAlignment = Enum.TextXAlignment.Right badge.Parent = card traitUI[traitId] = {Card = card, Stroke = cardStroke, Badge = badge} card.Activated:Connect(function() savedTraits[traitId] = not savedTraits[traitId] applyStateToFolder() updateUI() persistCurrentState(mainFrame) end) end end toggleAllBtn.Activated:Connect(function() local targetState = false for traitId, state in pairs(savedTraits) do if not state then targetState = true break end end for traitId in pairs(savedTraits) do savedTraits[traitId] = targetState end applyStateToFolder() updateUI() persistCurrentState(mainFrame) end) wbToggleBtn.Activated:Connect(function() workbenchEspEnabled = not workbenchEspEnabled wbToggleBtn.Text = workbenchEspEnabled and "WORKBENCH ESP: ON" or "WORKBENCH ESP: OFF" wbToggleBtn.BackgroundColor3 = workbenchEspEnabled and Color3.fromRGB(38, 120, 65) or Color3.fromRGB(120, 40, 45) refreshWorkbenchESP() persistCurrentState(mainFrame) end) lbToggleBtn.Activated:Connect(function() setLeaderboardState(not leaderboardVisible) lbToggleBtn.Text = leaderboardVisible and "LEADERBOARD: ON" or "LEADERBOARD: OFF" lbToggleBtn.BackgroundColor3 = leaderboardVisible and Color3.fromRGB(38, 120, 65) or Color3.fromRGB(120, 40, 45) persistCurrentState(mainFrame) end) local function hookPerks(perks) perks.ChildAdded:Connect(updateUI) perks.ChildRemoved:Connect(updateUI) applyStateToFolder() updateUI() end local function watchCharacter(char) if not char then return end local existingPerks = char:FindFirstChild("perks") if existingPerks then hookPerks(existingPerks) end char.ChildAdded:Connect(function(child) if child.Name == "perks" then hookPerks(child) end end) applyStateToFolder() end task.spawn(function() while true do local applied = applyStateToFolder() updateUI() if applied then break end task.wait(0.5) end end) local function setupWatcher() local activePlayers = Workspace:WaitForChild("activePlayers", 15) if not activePlayers then return end activePlayers.ChildAdded:Connect(function(child) if child.Name == LocalPlayer.Name then watchCharacter(child) end end) local existingChar = activePlayers:FindFirstChild(LocalPlayer.Name) if existingChar then watchCharacter(existingChar) end end setupWatcher() refreshWorkbenchESP() setLeaderboardState(leaderboardVisible) updateUI()