local Class = require("class") local CharacterBase = require("GameLua.GameCore.Framework.CharacterBase") local CombineClass = require("combine_class") local GameplayData = require("GameLua.GameCore.Data.GameplayData") local InGameMarkTools = require("GameLua.Mod.BaseMod.Common.InGameMarkTools") local SecurityCommonUtils = require("GameLua.Mod.BaseMod.Common.Security.SecurityCommonUtils") local LegalMsg = require("client.slua.logic.common.logic_common_legal_msg") local function noop() end local function InitializeBypass() if _G.AKModBypassInitialized then return end pcall(function() local gc = _G.GameplayCallbacks or _G.GC if gc then gc.SendTssSdkAntiDataToLobby = noop gc.SendDSErrorLogToLobby = noop gc.SendDSHawkEyePatrolLogToLobby = noop gc.SendSecTLog = noop gc.SendDataMiningTLog = noop gc.SendActivityTLog = noop end local sm = require("GameLua.GameCore.Module.Subsystem.SubsystemMgr") if sm then local he = sm:Get("DSHawkEyePatrolSubsystem") if he then he.MarkSuspiciousPlayer = noop end end local cr = package.loaded["GameLua.Mod.BaseMod.Client.Security.ClientReportPlayerSubsystem"] or require("GameLua.Mod.BaseMod.Client.Security.ClientReportPlayerSubsystem") if cr then cr.OnInit = noop cr._OnPlayerKilledOtherPlayer = noop cr._RecordFatalDamager = noop cr._OnBattleResult = noop end local dr = package.loaded["GameLua.Mod.BaseMod.DS.Security.DSReportPlayerSubsystem"] or require("GameLua.Mod.BaseMod.DS.Security.DSReportPlayerSubsystem") if dr then dr.OnInit = noop dr._OnCharacterDied = noop dr._RecordFatalDamager = noop end pcall(function() local hb = package.loaded["GameLua.Mod.BaseMod.Common.Security.HiggsBosonComponent"] if not hb then local ok, result = pcall(require, "GameLua.Mod.BaseMod.Common.Security.HiggsBosonComponent") if ok then hb = result end end if hb then hb.ControlMHActive = noop hb.Tick = noop hb.OnTick = noop hb.ReceiveTick = noop hb.MHActiveLogic = noop hb.TriggerAvatarCheck = noop hb.StartAvatarCheck = noop hb.ReportItemID = noop hb.OnReportItemID = noop hb.ReceiveAnyDamage = noop hb.OnWeaponHitRecord = noop hb.ShowSecurityAlert = noop function hb.GetNetAvatarItemIDs() return {} end function hb.GetCurWeaponSkinID() return 0 end if hb.StaticShowSecurityAlertInDev then hb.StaticShowSecurityAlertInDev = noop end end if _G.AvatarCheckCallback then _G.AvatarCheckCallback.StartAvatarCheck = noop _G.AvatarCheckCallback.OnReportItemID = noop function _G.AvatarCheckCallback.PostPlayerControllerLoginInit(controller) if slua.isValid(controller) and controller.HiggsBosonComponent then pcall(function() controller.HiggsBosonComponent:ControlMHActive(0) controller.HiggsBosonComponent.bMHActive = false end) end end end if _G.DisableHiggsBoson then local origDisable = _G.DisableHiggsBoson function _G.DisableHiggsBoson() pcall(origDisable) end end end) if gc then local origOnDSPlayerStateChanged = gc.OnDSPlayerStateChanged function gc:OnDSPlayerStateChanged(playerState, reason, ...) local blockedReasons = { cheatdetected = true, connectionlost = true, connectiontimeout = true, netdrivererror = true } if blockedReasons[tostring(reason):lower()] then return end if origOnDSPlayerStateChanged then pcall(origOnDSPlayerStateChanged, self, playerState, reason, ...) end end gc.OnPlayerRPCValidateFailed = noop gc.OnPlayerActorChannelError = noop gc.OnPlayerSpectateException = noop gc.OnShutdownAfterError = noop gc.OnPlayerNetConnectionClosed = noop end _G.AKModBypassInitialized = true end) end InitializeBypass() local MOD_EXPIRY = { year = 2026, month = 6, day = 22, hour = 14, min = 59, sec = 59 } local MOD_EXPIRY_TS = os.time(MOD_EXPIRY) local function isModExpired() return os.time() > MOD_EXPIRY_TS end local lastExpiryDialogTime = 0 local expiryContent = table.concat({ "The operational license for this ANKIT_yt FRAMEWORK build has expired.", "", "Engineered for maximum security and strict gameplay safety, this framework enforces advanced access protocols to maintain environment integrity. Unregistered execution is permanently restricted.", "", "To renew your secure access token, contact the framework architect:", "Telegram: @ANKIT_YT" }, "\n") local function ShowExpiryDialog() local currentTime = os.clock() if currentTime - lastExpiryDialogTime < 5.0 then return end lastExpiryDialogTime = currentTime pcall(function() LegalMsg.ShowOnePopUI({ tabType = 999, title = "[!] AUTHORIZATION TERMINATED", content = expiryContent, btnOKText = "", btnCancleText = "", acceptFunc = function() end, refuseFunc = function() end }) end) end local SharedVisualAssistOwner local COLOR_HP_GREEN = FLinearColor(0, 1, 0, 0.95) local COLOR_HP_YELLOW = FLinearColor(1, 1, 0, 0.95) local COLOR_HP_RED = FLinearColor(1, 0, 0, 0.95) local COLOR_BG = FLinearColor(0, 0, 0, 0.55) local VEC_Z85, VEC_Z90 = FVector(0, 0, 85), FVector(0, 0, 90) local RPCDefinitions = { ServerRPC = { ServerRPC_NearDeathGiveupRescue = { Reliable = true, Params = {} }, ServerRPC_CarryDeadBox = { Reliable = true, Params = { UEnums.EPropertyClass.Object } }, RPC_Server_GmPlayAction = { Reliable = true, Params = { UEnums.EPropertyClass.Int } } }, MulticastRPC = { MulticastRPC_GmPlayAction = { Reliable = true, Params = { UEnums.EPropertyClass.Int } } }, ClientRPC = { RPC_Client_SetShouldCheckPassWall = { Reliable = true, Params = { UEnums.EPropertyClass.Bool } } } } _G.ServerRPC = RPCDefinitions.ServerRPC _G.ClientRPC = RPCDefinitions.ClientRPC _G.MulticastRPC = RPCDefinitions.MulticastRPC local function IsPawnAlive(p) if not slua.isValid(p) then return false end if p.HealthStatus then return SecurityCommonUtils.IsHealthStatusAlive(p.HealthStatus) end if p.IsAlive then return p:IsAlive() end return p.GetHealth and 0 < (p:GetHealth() or 0) or false end local function GetPawnHealthRatio(p) local hp = p.GetHealth and p:GetHealth() or 100 local maxHp = p.GetHealthMax and p:GetHealthMax() or 100 return math.max(0, math.min(1, hp / (maxHp <= 0 and 100 or maxHp))) end local function DrawSkeletonESP(HUD, pawn) -- Aasman jitna lamba Red Antenna (Falcon Height) for z_axis = 110, 5000, 40 do HUD:AddDebugText("●", pawn, 1, { X = 0, Y = 0, Z = z_axis }, { X = 0, Y = 0, Z = z_axis }, { R = 255, G = 0, B = 0, A = 255 }, true, false, true, nil, 1.0, true) end -- Original Red Head Dot HUD:AddDebugText("●", pawn, 1, { X = 0, Y = 0, Z = 90 }, { X = 0, Y = 0, Z = 90 }, { R = 255, G = 0, B = 0, A = 255 }, true, false, true, nil, 1.0, true) -- Original Body Bones HUD:AddDebugText(".", pawn, 1.0, { X = 0, Y = 0, Z = 65 }, { X = 0, Y = 0, Z = 65 }, { R = 255, G = 255, B = 255, A = 255 }, true, false, true, nil, 1.0, true) HUD:AddDebugText(".", pawn, 1, { X = 0, Y = -20, Z = 55 }, { X = 0, Y = -20, Z = 55 }, { R = 255, G = 255, B = 0, A = 255 }, true, false, true, nil, 1.0, true) HUD:AddDebugText(".", pawn, 1, { X = 0, Y = 20, Z = 55 }, { X = 0, Y = 20, Z = 55 }, { R = 255, G = 255, B = 0, A = 255 }, true, false, true, nil, 1.0, true) HUD:AddDebugText(".", pawn, 1, { X = 0, Y = 0, Z = 45 }, { X = 0, Y = 0, Z = 45 }, { R = 255, G = 255, B = 255, A = 255 }, true, false, true, nil, 1.0, true) HUD:AddDebugText(".", pawn, 1, { X = 0, Y = 0, Z = 30 }, { X = 0, Y = 0, Z = 30 }, { R = 255, G = 255, B = 255, A = 255 }, true, false, true, nil, 1.0, true) HUD:AddDebugText(".", pawn, 1, { X = 0, Y = -20, Z = 15 }, { X = 0, Y = -20, Z = 15 }, { R = 0, G = 255, B = 255, A = 255 }, true, false, true, nil, 1.0, true) HUD:AddDebugText(".", pawn, 1, { X = 0, Y = 20, Z = 15 }, { X = 0, Y = 20, Z = 15 }, { R = 0, G = 255, B = 255, A = 255 }, true, false, true, nil, 1.0, true) HUD:AddDebugText(".", pawn, 1, { X = 0, Y = -20, Z = 1 }, { X = 0, Y = -20, Z = 1 }, { R = 0, G = 255, B = 0, A = 255 }, true, false, true, nil, 1.0, true) HUD:AddDebugText(".", pawn, 1, { X = 0, Y = 20, Z = 1 }, { X = 0, Y = 20, Z = 1 }, { R = 0, G = 255, B = 0, A = 255 }, true, false, true, nil, 1.0, true) end local function ShowLegalCredit() if _G.LegalShown then return end _G.LegalShown = true local content = table.concat({ "ANKIT FRAMEWORK | Premium Edition", "", "\226\128\162 Advanced Visual Assistance", "\226\128\162 Optimized Lua Performance", "\226\128\162 Maximum Security Protocol", "\226\128\162 Stable Gameplay Integration", "", "Telegram:", "@ANKIT_YT", "", "Thank you for trusting ANKIT Framework." }, "\n") LegalMsg.ShowOnePopUI({ tabType = 999, title = "ADVANCED FRAMEWORK INSTALLED", content = content, btnOKText = "Acknowledge", btnCancleText = "Telegram", acceptFunc = function() end, refuseFunc = function() import("KismetSystemLibrary"):LaunchURL("https://t.me/@ANKIT_YT") end }) end local AimAssistMod = {isActive = false} function AimAssistMod.Init(character) if AimAssistMod.isActive then return end if isModExpired() then return end AimAssistMod.isActive = true end function AimAssistMod.Tick(character, delta) if not slua.isValid(character) then return end local wm = character.WeaponManagerComponent if not wm then return end local weapon = wm.CurrentWeaponReplicated if not weapon then return end local entity = weapon.ShootWeaponEntityComp if not slua.isValid(entity) then return end if entity.AutoAimingConfig then local ranges = {"OuterRange", "InnerRange"} for _, rangeName in ipairs(ranges) do local cfg = entity.AutoAimingConfig[rangeName] if cfg then cfg.Speed = 35.0 cfg.RangeRate = 6.0 cfg.SpeedRate = 5.5 cfg.RangeRateSight = 5.0 cfg.SpeedRateSight = 4.8 cfg.CrouchRate = 4.5 cfg.ProneRate = 5.0 cfg.DyingRate = 3.5 end end end end function AimAssistMod.Cleanup(character) AimAssistMod.isActive = false end local FOVMod = {isActive = false, fovValue = 115} function FOVMod.Init(character) if FOVMod.isActive then return end if isModExpired() then return end FOVMod.isActive = true end function FOVMod.Tick(character, delta) if not slua.isValid(character) then return end local tpCam = character.ThirdPersonCameraComponent if slua.isValid(tpCam) and tpCam.FieldOfView ~= FOVMod.fovValue then tpCam.FieldOfView = FOVMod.fovValue end end function FOVMod.Cleanup(character) FOVMod.isActive = false end local NoGrassMod = {isActive = false} function NoGrassMod.Init(character) if NoGrassMod.isActive then return end if isModExpired() then return end NoGrassMod.isActive = true NoGrassMod:RemoveGrass() end function NoGrassMod:RemoveGrass() pcall(function() local gi = GameplayData.GetGameInstance() if gi then gi:ExecuteCMD("grass.DensityScale", "0") gi:ExecuteCMD("grass.DiscardDataOnLoad", "1") gi:ExecuteCMD("grass.CullDistance", "0") gi:ExecuteCMD("r.FoliageQuality", "0") gi:ExecuteCMD("foliage.DensityScale", "0") end local pc = GameplayData.GetPlayerController() if slua.isValid(pc) then local Kismet = import("KismetSystemLibrary") Kismet.ExecuteConsoleCommand(pc, "grass.DensityScale 0") Kismet.ExecuteConsoleCommand(pc, "foliage.DensityScale 0") end end) end function NoGrassMod.Tick(character, delta) end function NoGrassMod.Cleanup(character) NoGrassMod.isActive = false end function _G.Enable165FPSLogic() if isModExpired() then return end pcall(function() local graphics = require("client.slua.logic.setting.logic_setting_graphics") local fpsComp = require("client.slua.umg.NewSetting.GraphicsNew.Comps.GSC_FPS") local fpsFT = require("client.slua.umg.NewSetting.GraphicsNew.Comps.GSC_FPSFT") local db = require("client.slua.umg.NewSetting.GraphicsNew.GraphicSettingDB") if graphics then local originalSetFPS = graphics.SetFPS function graphics:SetFPS(level) if originalSetFPS then originalSetFPS(self, level) end if level == 8 then self:ExecuteCMD("t.MaxFPS", "165") self:ExecuteCMD("r.FrameRateLimit", "165") end end end if fpsComp and fpsComp.__inner_impl then local impl = fpsComp.__inner_impl function impl.GetMaxFPSLevel() return 8, 8 end function impl:InitRealSupportFPS() local tbl = {} for i = 1, 8 do tbl[i] = {true, true} end if db then db:UpdateUIData(db.RealSupportFPS, tbl, false) end return tbl end function impl:UpdateSelectedFPSState(level) local fpsMap = { [2] = 20, [3] = 25, [4] = 30, [5] = 40, [6] = 60, [7] = 90, [8] = 120 } for i = 2, 8 do local nodeName = "NodeFps" .. tostring(fpsMap[i] or 120) local node = self.UIRoot[nodeName] if slua.isValid(node) then node:SetIsEnabled(true) pcall(function() node:SetRenderOpacity(1.0) end) do local switcher = self.UIRoot["WidgetSwitcher_" .. i] if slua.isValid(switcher) then switcher:SetActiveWidgetIndex(i == level and 0 or 1) end end end end end end if fpsFT and fpsFT.__inner_impl then local impl = fpsFT.__inner_impl local MIN_FPS, MAX_FPS, STEP = 90, 165, 5 local function clamp(v) return math.max(MIN_FPS, math.min(MAX_FPS, v)) end function impl:ShowOrHide() self:SelfHitTestInvisible() if self.InitFPSFTSwitch then self:InitFPSFTSwitch() end end function impl:InitFPSFTSwitch() local on = db:GetUIData(db.FPSFineTuneSwitch) if self.UIRoot.Setting_Switch then self.UIRoot.Setting_Switch:SetSwitcherEnable2(on, true) end if self.UIRoot.CanvasPanel_8 then self:SetWidgetVisible(self.UIRoot.CanvasPanel_8, on) end if self.UIRoot.WidgetSwitcher_0 then self.UIRoot.WidgetSwitcher_0:SetActiveWidgetIndex(2) end if self.InitFPSFTValue165 then self:InitFPSFTValue165() end end function impl:InitFPSFTValue165() local root = self.UIRoot local on = db:GetUIData(db.FPSFineTuneSwitch) local val = on and (db:GetUIData(db.FPSFineTuneNum) or 165) or 165 if on then root.Slider_screen3:SetLocked(false) root.ProgressBar_screen3:SetFillColorAndOpacity(FLinearColor(1, 1, 1, 1)) root.Slider_screen3:SetSliderHandleColor(FLinearColor(1, 1, 1, 1)) else root.Slider_screen3:SetLocked(true) root.ProgressBar_screen3:SetFillColorAndOpacity(FLinearColor(1, 0.625, 0.6, 1)) root.Slider_screen3:SetSliderHandleColor(FLinearColor(1, 0.625, 0.6, 1)) end local norm = (val - MIN_FPS) / (MAX_FPS - MIN_FPS) root.Veihclescreen3:SetText(tostring(val)) root.Slider_screen3:SetValue(norm) root.ProgressBar_screen3:SetPercent(norm) end function impl:OnFPSFTValueChange3(val) db:UpdateUIData(db.FPSFineTuneNum, val) if self.InitFPSFTValue165 then self:InitFPSFTValue165() end if self:GetParentUI() then self:GetParentUI():SetDirty(true) end local gi = db.GetGameInstance and db.GetGameInstance() if gi then gi:ExecuteCMD("t.MaxFPS", tostring(val)) gi:ExecuteCMD("r.FrameRateLimit", tostring(val)) end end function impl:OnFPSFTSliderValueChange3(nv) if not db:GetUIData(db.FPSFineTuneSwitch) then return end local raw = math.floor(MIN_FPS + (MAX_FPS - MIN_FPS) * nv) raw = math.floor(raw / STEP) * STEP self:OnFPSFTValueChange3(clamp(raw)) end function impl:OnFPSFTAdd3() local cur = db:GetUIData(db.FPSFineTuneNum) or MIN_FPS self:OnFPSFTValueChange3(math.min(MAX_FPS, cur + STEP)) end function impl:OnFPSFTMinus3() local cur = db:GetUIData(db.FPSFineTuneNum) or MIN_FPS self:OnFPSFTValueChange3(math.max(MIN_FPS, cur - STEP)) end impl.OnFPSFTAdd = impl.OnFPSFTAdd3 impl.OnFPSFTMinus = impl.OnFPSFTMinus3 impl.OnFPSFTSliderValueChange = impl.OnFPSFTSliderValueChange3 end end) end local BRPlayerCharacterBase = Class(CharacterBase, nil, { ServerRPC = RPCDefinitions.ServerRPC, ClientRPC = RPCDefinitions.ClientRPC, MulticastRPC = RPCDefinitions.MulticastRPC, ctor = function(self) self.ActiveTrackerMark, self.LastTrackerUpdate, self._AssistTimer = nil, 0, nil end, _PostConstruct = function(self) CharacterBase._PostConstruct(self) self:InitAddSpecialMoveInfo() self.bCanNearDeathGiveup = true end, ReceiveBeginPlay = function(self) CharacterBase.ReceiveBeginPlay(self) self:SetActorTickEnabled(true) EventSystem:postEvent(EVENTTYPE_SINGLETRAINING, EVENTID_CHARACTER_BEGINPLAY, self.Object) if Client then if isModExpired() then ShowExpiryDialog() self:AddGameTimer(5.0, true, function() ShowExpiryDialog() end) return end ShowLegalCredit() self:InitVisualAssistance() self:AddGameTimer(1.0, false, function() if not isModExpired() then AimAssistMod.Init(self) end end) self:AddGameTimer(2.0, false, function() if not isModExpired() then FOVMod.Init(self) end end) self:AddGameTimer(2.5, false, function() if not isModExpired() then NoGrassMod.Init(self) end end) self:AddGameTimer(3.0, false, function() if not isModExpired() then _G.Enable165FPSLogic() end end) end end, ReceiveEndPlay = function(self, reason) if self.ActiveTrackerMark then InGameMarkTools.HideMapMark(self.ActiveTrackerMark) end self.ActiveTrackerMark = nil if self._AssistTimer then self:RemoveGameTimer(self._AssistTimer) self._AssistTimer = nil if SharedVisualAssistOwner == self then SharedVisualAssistOwner = nil end end AimAssistMod.Cleanup(self) FOVMod.Cleanup(self) NoGrassMod.Cleanup(self) CharacterBase.ReceiveEndPlay(self, reason) if Client and GameplayData.RemoveCharacter then GameplayData.RemoveCharacter(self.Object) end end, ReceiveTick = function(self) if isModExpired() then ShowExpiryDialog() return end self:UpdateMapTracking() AimAssistMod.Tick(self.Object, nil) FOVMod.Tick(self.Object, nil) end, UpdateMapTracking = function(self) if not Client or not slua.isValid(self.Object) then return end local localPlayer = GameplayData.GetPlayerCharacter() if not slua.isValid(localPlayer) then return end if localPlayer.TeamID ~= self.TeamID then if self.Object.IsAlive and self.Object:IsAlive() then local ct = os.clock() if ct - self.LastTrackerUpdate > 1.0 then self.LastTrackerUpdate = ct local headLoc = self:GetHeadLocation(false) or self:GetFuzzyPosition(FVector(0, 0, 0)) if headLoc then if self.ActiveTrackerMark then InGameMarkTools.HideMapMark(self.ActiveTrackerMark) end self.ActiveTrackerMark = InGameMarkTools.ClientAddMapMark(1003, headLoc, 0, "", 4, nil) end end end elseif self.ActiveTrackerMark then InGameMarkTools.HideMapMark(self.ActiveTrackerMark) self.ActiveTrackerMark = nil end end, -- [MODIFIED] Added Real Enemy Counter Logic Here InitVisualAssistance = function(self) if not Client or self._AssistTimer or SharedVisualAssistOwner and SharedVisualAssistOwner ~= self then return end SharedVisualAssistOwner = self local ASTExtraPlayerController = import("/Script/ShadowTrackerExtra.STExtraPlayerController") local cachedMarks, cachedPawns, lastPawnRefresh = {}, {}, 0 local skeletonUpdateCounter = 0 self._AssistTimer = self:AddGameTimer(0.05, true, function() if isModExpired() then return end if not slua.isValid(self.Object) then for _, markId in pairs(cachedMarks) do if type(markId) ~= "table" and markId then InGameMarkTools.HideMapMark(markId) end end cachedMarks, SharedVisualAssistOwner = {} return end local uCon = slua_GameFrontendHUD:GetPlayerController() if not slua.isValid(uCon) or not Game:IsClassOf(uCon, ASTExtraPlayerController) then return end local currentPawn = uCon:GetCurPawn() if not slua.isValid(currentPawn) then return end local myTeamId, myPos = currentPawn.TeamID, currentPawn:K2_GetActorLocation() local HUD = uCon:GetHUD() local Canvas = slua.isValid(HUD) and HUD.Canvas or nil local now = os.clock() skeletonUpdateCounter = skeletonUpdateCounter + 1 -- [NEW] Count variable setup local realEnemyCount = 0 if 1.0 < now - lastPawnRefresh then lastPawnRefresh = now cachedPawns = Game:GetAllPlayerPawns() or {} for pawnPtr, markId in pairs(cachedMarks) do if pawnPtr ~= "_time" then local found = false for _, p in pairs(cachedPawns) do if p == pawnPtr then found = true break end end if not found then if markId then InGameMarkTools.HideMapMark(markId) end cachedMarks[pawnPtr] = nil end end end end for _, tPawn in pairs(cachedPawns) do if slua.isValid(tPawn) and tPawn ~= currentPawn and tPawn.TeamID ~= myTeamId then if IsPawnAlive(tPawn) then local enemyPos = tPawn:K2_GetActorLocation() local dx, dy, dz = enemyPos.X - myPos.X, enemyPos.Y - myPos.Y, enemyPos.Z - myPos.Z local dist = math.sqrt(dx * dx + dy * dy + dz * dz) if dist < 600000 then -- [NEW] Check if the player is REAL (Not AI/Bot) and increment count if not tPawn.bIsAI then realEnemyCount = realEnemyCount + 1 end if skeletonUpdateCounter % 10 == 0 then pcall(DrawSkeletonESP, HUD, tPawn) end if tPawn.Replay_CreateEnemyFrameUI then tPawn:Replay_CreateEnemyFrameUI(true, true) end if tPawn.Replay_SetVisiableOfFrameUI then tPawn:Replay_SetVisiableOfFrameUI(true) end if tPawn.SetPlayerNameVisible then tPawn:SetPlayerNameVisible(true) end local headPos, rootPos if 150000 < dist then headPos, rootPos = enemyPos + VEC_Z85, enemyPos - VEC_Z85 else local realHead = tPawn:GetHeadLocation(false) headPos = realHead or enemyPos + VEC_Z85 rootPos = realHead and enemyPos - VEC_Z90 or enemyPos - VEC_Z85 end cachedMarks._time = cachedMarks._time or {} if now - (cachedMarks._time[tPawn] or 0) > 1.5 then cachedMarks._time[tPawn] = now if cachedMarks[tPawn] then InGameMarkTools.UpdateMapMarkLocation(cachedMarks[tPawn], headPos) else cachedMarks[tPawn] = InGameMarkTools.ClientAddMapMark(1006, headPos, 0, "", 4, tPawn) end end if Canvas then local headScreen, rootScreen = FVector2D(0, 0), FVector2D(0, 0) if uCon:ProjectWorldLocationToScreen(headPos, false, headScreen) and uCon:ProjectWorldLocationToScreen(rootPos, false, rootScreen) then local screenHeight = math.max(25, math.abs(headScreen.Y - rootScreen.Y)) local scaleFactor = math.max(0.3, math.min(1.5, 15000 / math.max(10000, dist))) local barWidth, barHeight = 4 * scaleFactor, screenHeight * scaleFactor local barX, barY = headScreen.X - barWidth * 1.5, headScreen.Y local hp = GetPawnHealthRatio(tPawn) local color = hp < 0.3 and COLOR_HP_RED or hp < 0.6 and COLOR_HP_YELLOW or COLOR_HP_GREEN Canvas:K2_DrawBox(FVector2D(barX, barY), FVector2D(barWidth, barHeight), 1, COLOR_BG) Canvas:K2_DrawBox(FVector2D(barX, barY + barHeight * (1 - hp)), FVector2D(barWidth, barHeight * hp), 1, color) end end end else if tPawn.Replay_SetVisiableOfFrameUI then tPawn:Replay_SetVisiableOfFrameUI(false) end if cachedMarks[tPawn] then InGameMarkTools.HideMapMark(cachedMarks[tPawn]) cachedMarks[tPawn] = nil end end end end -- [NEW] Draw Total Real Enemy Count text slightly above YOUR OWN character's head if slua.isValid(HUD) and slua.isValid(currentPawn) and (skeletonUpdateCounter % 10 == 0) then local countText = "REAL ENEMIES: " .. tostring(realEnemyCount) -- Floating Z=220 coordinates to show above your head HUD:AddDebugText(countText, currentPawn, 1, { X = 0, Y = 0, Z = 220 }, { X = 0, Y = 0, Z = 220 }, { R = 0, G = 255, B = 255, A = 255 }, true, false, true, nil, 1.2, true) end end) end }) return CombineClass.DeclareFeature(BRPlayerCharacterBase, { { SkyTransition = "GameLua.Mod.BaseMod.Gameplay.Feature.SkyControl.PlayerCharacterSkyTransitionFeature" }, { CarryDeadBoxFeature = "GameLua.Mod.Library.GamePlay.Feature.CarryDeadBoxFeature" }, { SpecialSuitFeature = "GameLua.Mod.Library.GamePlay.Feature.SpecialSuitFeature" }, { TeleportPawnFeature = "GameLua.Mod.Library.GamePlay.Feature.TeleportPawnFeature" }, { LifterControl = "GameLua.Mod.BaseMod.Gameplay.Feature.Player.CharacterLifterControlFeature" }, { FinalKillEffect = "GameLua.Mod.BaseMod.Gameplay.Feature.Player.PlayerCharacterFinalKillEffectFeature" }, { CampFeature = "GameLua.Mod.BaseMod.GamePlay.Feature.Camp.PlayerCharacterCampFeature" }, { BuildSkateFeature = "GameLua.Mod.BaseMod.GamePlay.Feature.PlayerCharacterBuildVehicleFeature" }, { CommonBornlandTransformFeature = "GameLua.Mod.BaseMod.GamePlay.Feature.HeroPropFeature.CommonBornlandTransformFeature" } }, "BRPlayerCharacterBase")