Skip to content

Commit 9fe0de9

Browse files
Add files via upload
1 parent 184de6a commit 9fe0de9

File tree

1 file changed

+12
-40
lines changed

1 file changed

+12
-40
lines changed

Swing_Prediction.lua

+12-40
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ local mSensetivity = menu:AddComponent(MenuLib.Slider("Charge Sensetivity",1 ,5
4747

4848
local mAutoRefill = menu:AddComponent(MenuLib.Checkbox("Crit Refill", true))
4949
--local AutoFakelat = menu:AddComponent(MenuLib.Checkbox("Adaptive Latency", true, ItemFlags.FullWidth))
50-
local AchargeRange = menu:AddComponent(MenuLib.Checkbox("Charge Reach", false, ItemFlags.FullWidth))
50+
local AchargeRange = menu:AddComponent(MenuLib.Checkbox("Charge Reach", true, ItemFlags.FullWidth))
5151
local mAutoGarden = menu:AddComponent(MenuLib.Checkbox("Troldier assist", false))
5252
local mmVisuals = menu:AddComponent(MenuLib.Checkbox("Enable Visuals", false))
5353
local mKeyOverrite = menu:AddComponent(MenuLib.Keybind("Keybind", key))
@@ -68,7 +68,7 @@ local ping = 0
6868
local swingrange = 48
6969
local tickRate = 66
7070
local tick_count = 0
71-
local time = 14
71+
local time = 15
7272
local Gcan_attack = false
7373
local Safe_Strafe = false
7474
local can_charge = false
@@ -202,7 +202,7 @@ local function GetBestTarget(me)
202202

203203
for _, target in ipairs(targetList) do
204204
local player = target.player
205-
local aimPos = player:GetAbsOrigin()
205+
local aimPos = player:GetAbsOrigin() + Vector3(0, 0, 75)
206206
local angles = Math.PositionAngles(localPlayer:GetAbsOrigin(), aimPos)
207207
local fov = Math.AngleFov(angles, engine.GetViewAngles())
208208

@@ -367,16 +367,6 @@ local function OnCreateMove(pCmd)
367367
end
368368
end
369369

370-
--[[ Initialize the temporary fake latency value
371-
if gui.GetValue("Fake Latency Value (MS)") ~= 200 then
372-
defFakeLatency = gui.GetValue("Fake Latency Value (MS)")
373-
end
374-
375-
-- Initialize the temporary fake latency value
376-
if gui.GetValue("Fake Latency Value (MS)") == 200 then
377-
gui.SetValue("Fake Latency Value (MS)", defFakeLatency)
378-
end]]
379-
380370
--[-Don`t run script below when not usign melee--]
381371

382372
isMelee = pWeapon:IsMeleeWeapon() -- check if using melee weapon
@@ -396,15 +386,15 @@ end]]
396386

397387
--[-------- Get SwingRange --------]
398388
swingrange = pWeapon:GetSwingRange()
399-
local hitboxData = pLocal:HitboxSurroundingBox()
400-
local hitboxSize = hitboxData[1] - hitboxData[2]
401-
local hitboxHeight = hitboxSize.z
402-
403-
hitboxSize.z = 0 -- Set z component to 0 to get the horizontal size
389+
-- local hitboxData = pLocal:EntitySpaceHitboxSurroundingBox()
390+
--local hitboxSize = hitboxData[1]
391+
--local hitboxHeight = hitboxSize.z
404392

393+
--hitboxSize.z = 0 -- Set z component to 0 to get the horizontal size
394+
--print(-hitboxSize.y)
405395
-- Now you can use hitboxSize and hitboxHeight as variables representing the size and height of the hitbox respectively
406396

407-
hitboxSize = 36
397+
local hitboxSize = 36
408398

409399
if pWeaponDef:GetName() == "The Disciplinary Action" then
410400
hitboxSize = 55.8
@@ -565,35 +555,16 @@ local cornerposition = Vector3( --ToDO: fix this
565555
if pLocalClass == 4 -- player is Demoman
566556
and AchargeRange:GetValue() -- menu option for such option is true
567557
and chargeLeft == 100 then -- charge metter is full
568-
InRange = checkInRange(vPlayerFuture, pLocalOrigin, Charge_Range) -- Check for InRange during charge
558+
InRange = checkInRange(vPlayerFuture, pLocalFuture, Charge_Range) -- Check for InRange during charge
569559
if InRange then
570560
can_attack = true
571561
tick_count = tick_count + 1
572-
if tick_count % (time - Latency + 2) == 0 then
562+
if tick_count % (time - Latency) == 0 then
573563
can_charge = true
574564
end
575565
end
576566
end
577567

578-
--[[ Check if AutoFakelat is enabled
579-
if AutoFakelat:GetValue() then
580-
-- Check if there is a InRange
581-
if InRange or fDistance < swingrange + 20 then
582-
-- Check if the global fake latency value is not already 200 and is greater than or equal to 200
583-
if defFakeLatency ~= 200 then
584-
-- Set the fake latency value to 200
585-
gui.SetValue("Fake Latency Value (MS)", 200)
586-
end
587-
else
588-
-- Check if the fake latency value is already 200
589-
if gui.GetValue("Fake Latency Value (MS)") == 200 then
590-
-- Set the fake latency value to the global fake latency value
591-
gui.SetValue("Fake Latency Value (MS)", defFakeLatency)
592-
593-
end
594-
end
595-
end]]
596-
597568

598569
--[--------------AimBot-------------------] --get hitbox of ennmy pelwis(jittery but works)
599570
local hitboxes = CurrentTarget:GetHitboxes()
@@ -829,6 +800,7 @@ if not mmVisuals:GetValue() or not pWeapon:IsMeleeWeapon() then return end
829800
end
830801

831802
-- Draw a second circle if AchargeRange is enabled
803+
--center = pLocal:GetAbsOrigin()
832804
if pLocalClass == 4 and AchargeRange:GetValue() and chargeLeft >= 100 then
833805
-- Define the color for the second circle
834806
color = {r = 255, g = 0, b = 0, a = 255} -- red

0 commit comments

Comments
 (0)