@@ -175,7 +175,7 @@ local function LoadCFG(folder_name)
175
175
local content = file :read (" *a" )
176
176
file :close ()
177
177
local chunk , err = load (" return " .. content )
178
- if chunk then
178
+ if chunk and not input . IsButtonDown ( KEY_LSHIFT ) then
179
179
printc (0 , 255 , 140 , 255 , " [" .. os.date (" %H:%M:%S" ) .. " ] Loaded Config from " .. tostring (fullPath ))
180
180
return chunk ()
181
181
else
213
213
-- This ensures settings are properly initialized even after loading the config
214
214
SafeInitMenu ()
215
215
216
- -- Synchronize duplicated settings to avoid conflicts
217
- local function SyncSettings ()
218
- -- Synchronize ChargeBot setting (exists in both Aimbot and Charge sections)
219
- if Menu .Charge .ChargeBot ~= Menu .Aimbot .ChargeBot then
220
- -- Prefer the Charge tab setting as it's the proper location
221
- Menu .Aimbot .ChargeBot = Menu .Charge .ChargeBot
222
- print (" Synchronized ChargeBot settings" )
223
- end
224
- end
225
-
226
- -- Run synchronization after loading config
227
- SyncSettings ()
228
-
229
216
local isMelee = false
230
217
local pLocal = nil
231
218
local players = entities .FindByClass (" CTFPlayer" )
@@ -1316,13 +1303,8 @@ local function OnCreateMove(pCmd)
1316
1303
dashKeyBound = gui .GetValue (" dash move key" ) ~= 0
1317
1304
local canInstantAttack = Menu .Misc .InstantAttack and warp .CanWarp () and warp .GetChargedTicks () >= 13 and dashKeyBound
1318
1305
1319
- -- Temporarily disable charge reach if instant attack is ready
1320
- local tempChargeReach = Menu .Misc .ChargeReach
1321
- if canInstantAttack then
1322
- Menu .Misc .ChargeReach = false
1323
- end
1324
-
1325
- -- Distance check and target range check
1306
+ -- No need to temporarily store ChargeReach - directly check it when needed
1307
+ -- Get distance check and target range check
1326
1308
-- Get current distance between local player and closest player
1327
1309
Vdistance = (vPlayerOrigin - pLocalOrigin ):Length ()
1328
1310
@@ -1337,8 +1319,7 @@ local function OnCreateMove(pCmd)
1337
1319
can_attack = inRange
1338
1320
1339
1321
-- [--------------AimBot-------------------] --get hitbox of ennmy pelwis(jittery but works)
1340
- hitboxes = CurrentTarget :GetHitboxes ()
1341
- hitbox = hitboxes [6 ]
1322
+
1342
1323
aimpos = nil
1343
1324
-- else
1344
1325
aimpos = CurrentTarget :GetAbsOrigin () +
@@ -1397,7 +1378,7 @@ local function OnCreateMove(pCmd)
1397
1378
local weaponData = pWeapon :GetWeaponData ()
1398
1379
if weaponData and weaponData .smackDelay then
1399
1380
-- Convert smackDelay time to ticks (rounded up to ensure we have enough time)
1400
- weaponSmackDelay = math.ceil (weaponData .smackDelay / globals .TickInterval ())
1381
+ weaponSmackDelay = math.floor (weaponData .smackDelay / globals .TickInterval ())
1401
1382
-- Ensure a minimum viable value
1402
1383
weaponSmackDelay = math.max (weaponSmackDelay , 5 )
1403
1384
@@ -1485,8 +1466,7 @@ local function OnCreateMove(pCmd)
1485
1466
can_attack = false
1486
1467
end
1487
1468
1488
- -- Restore original charge reach setting
1489
- Menu .Misc .ChargeReach = tempChargeReach
1469
+ -- No need to restore any ChargeReach setting as we're not temporarily changing it
1490
1470
1491
1471
if can_charge then
1492
1472
if Menu .Misc .ChargeJump and input .IsButtonPressed (MOUSE_RIGHT ) and OnGround then
@@ -2203,15 +2183,30 @@ local function doDraw()
2203
2183
ImMenu .EndFrame ()
2204
2184
2205
2185
ImMenu .BeginFrame (1 )
2186
+ local oldChargeControl = Menu .Charge .ChargeControl
2206
2187
Menu .Charge .ChargeControl = ImMenu .Checkbox (" Charge Control" , Menu .Charge .ChargeControl )
2188
+ -- If the value changed, synchronize with the Misc setting
2189
+ if oldChargeControl ~= Menu .Charge .ChargeControl then
2190
+ Menu .Misc .ChargeControl = Menu .Charge .ChargeControl
2191
+ end
2207
2192
ImMenu .EndFrame ()
2208
2193
2209
2194
ImMenu .BeginFrame (1 )
2195
+ local oldChargeReach = Menu .Charge .ChargeReach
2210
2196
Menu .Charge .ChargeReach = ImMenu .Checkbox (" Charge Reach" , Menu .Charge .ChargeReach )
2197
+ -- If the value changed, synchronize with the Misc setting
2198
+ if oldChargeReach ~= Menu .Charge .ChargeReach then
2199
+ Menu .Misc .ChargeReach = Menu .Charge .ChargeReach
2200
+ end
2211
2201
ImMenu .EndFrame ()
2212
2202
2213
2203
ImMenu .BeginFrame (1 )
2204
+ local oldChargeJump = Menu .Charge .ChargeJump
2214
2205
Menu .Charge .ChargeJump = ImMenu .Checkbox (" Charge Jump" , Menu .Charge .ChargeJump )
2206
+ -- If the value changed, synchronize with the Misc setting
2207
+ if oldChargeJump ~= Menu .Charge .ChargeJump then
2208
+ Menu .Misc .ChargeJump = Menu .Charge .ChargeJump
2209
+ end
2215
2210
ImMenu .EndFrame ()
2216
2211
end
2217
2212
0 commit comments