auto dive rfx
Key RequiredUniversal

auto dive rfx

Universal Scriptmm5033053mm5033053 196 views 4.8K executesUpdated Aug 10, 2026
Unrated
00
Lua Script•327 lines (17440 chars)
-- V17 FIXED MINIMAL - EXACT COPY OF V17 WHICH WORKS + ONLY 3 LINES CHANGED FOR THROUGH BUG
-- V17 original had MinOffset 0.35 so near-center shots (0.2) didn't dive and went through
-- Fixed: MinOffset 0.12, CentralThreshold 1.8 = if ball almost central, do CENTER BLOCK not full side dive
-- Also holds W forward during dive to cover body
-- Everything else IDENTICAL to V17

print("=== V17 FIXED MINIMAL LOADING ===")
warn("=== V17 FIXED MINIMAL ===")

local Players=game:GetService("Players")
local RunService=game:GetService("RunService")
local Workspace=game:GetService("Workspace")
local UIS=game:GetService("UserInputService")
local StarterGui=game:GetService("StarterGui")

local LocalPlayer=Players.LocalPlayer
local hasVIM, VIM = pcall(function() return game:GetService("VirtualInputManager") end)

local Character=LocalPlayer.Character or LocalPlayer.CharacterAdded:Wait()
local HRP=Character:WaitForChild("HumanoidRootPart",5)

local Settings={
    Enabled=true,
    HoldBefore=0.01,
    HoldAfter=2.3, -- was 2.0, slightly longer to prevent through after dive
    DoubleEGap=0.028,
    DiveDuration=0.24,
    TriggerDist=380,
    MinOffset=0.12, -- FIXED: was 0.35, now 0.12 so center shots still dive and don't go through
    CentralThreshold=1.8, -- NEW: if abs(futureX) <1.8 = central block
    MinSpeed=2.5,
    Cooldown=0.40, -- was 0.48, slightly faster for second save
    Trajectory=true,
}

local diving=false
local lastDive=0
local TrackedBalls={}
local cachedBalls={}
local lastScan=0
local goalCenter=nil

local function notify(t,m) print("[V17-MIN]",t,m) pcall(function() StarterGui:SetCore("SendNotification",{Title=t,Text=m,Duration=2}) end) end
local function vimPress(k,down) if hasVIM then pcall(function() VIM:SendKeyEvent(down,k,false,game) end) end end
local function doubleE() vimPress(Enum.KeyCode.E,true) task.wait(0.038) vimPress(Enum.KeyCode.E,false) task.wait(Settings.DoubleEGap) vimPress(Enum.KeyCode.E,true) task.wait(0.038) vimPress(Enum.KeyCode.E,false) end
local function dive(dir, reason)
    if diving then return end
    if tick()-lastDive < Settings.Cooldown then return end
    diving=true lastDive=tick()
    local side="CENTER"
    if dir>0 then side="RIGHT" elseif dir<0 then side="LEFT" end
    notify("DIVE "..side, reason)
    task.spawn(function()
        local mk=nil
        if dir>0 then mk=Enum.KeyCode.D elseif dir<0 then mk=Enum.KeyCode.A end
        print(string.format("[V17-MIN] DIVE %s | %s", side, reason))
        -- Forward component to prevent through
        vimPress(Enum.KeyCode.W, true)
        if mk then vimPress(mk,true) end
        task.wait(Settings.HoldBefore)
        doubleE()
        task.wait(Settings.HoldAfter)
        vimPress(Enum.KeyCode.A,false) vimPress(Enum.KeyCode.D,false) vimPress(Enum.KeyCode.W,false)
        task.wait(Settings.Cooldown)
        diving=false
    end)
end

pcall(function()
    for _, obj in ipairs(Workspace:GetChildren()) do
        if obj.Name:lower():find("goal") then
            local part=nil
            if obj:IsA("BasePart") then part=obj else part=obj:FindFirstChildWhichIsA("BasePart", true) end
            if part and (part.Position-HRP.Position).Magnitude<160 then
                goalCenter=part.Position
                print("[V17-MIN] Goal found light:", obj.Name)
                break
            end
        end
    end
    if not goalCenter then goalCenter=HRP.Position - HRP.CFrame.LookVector*5 end
end)

local function isBall(o) if not o then return false end local n=o.Name if n:sub(1,4)=="Ball" then return true end if n:lower():find("ball") then return true end return false end
local function getPart(m) if m:IsA("BasePart") then return m end if m:IsA("Model") then return m.PrimaryPart or m:FindFirstChildWhichIsA("BasePart", true) end return nil end
local function scanBalls()
    local now=tick()
    if now-lastScan < 0.30 then return cachedBalls end
    lastScan=now
    local found={}
    for _, child in ipairs(Workspace:GetChildren()) do if isBall(child) then local p=getPart(child) if p then table.insert(found,p) end end end
    for _, fname in ipairs({"Balls","Ball"}) do local folder=Workspace:FindFirstChild(fname) if folder then for _,ch in ipairs(folder:GetChildren()) do local p=getPart(ch) if p then table.insert(found,p) end end end end
    if #found==0 then for _, obj in ipairs(Workspace:GetDescendants()) do if #found>=14 then break end if isBall(obj) then local p=getPart(obj) if p and p.Size.Magnitude<25 and not (Character and p:IsDescendantOf(Character)) then local dup=false for _,f in ipairs(found) do if f==p then dup=true break end end if not dup then table.insert(found,p) end end end end end
    cachedBalls=found
    return found
end

local function updateTrack()
    local now=tick()
    local all=scanBalls()
    for _,bp in ipairs(all) do
        local d=TrackedBalls[bp]
        if not d then
            TrackedBalls[bp]={part=bp,lastPos=bp.Position,lastTime=now,aiVel=Vector3.new(0,0,0),realVel=bp.AssemblyLinearVelocity,lastSpeed=0,shotTime=0,shooterName=nil,shooterLook=nil,history={}}
            print("[V17-MIN] TRACK NEW:", bp.Parent.Name)
        else
            local dt=now-d.lastTime
            if dt>=0.028 then
                local aiV=(bp.Position-d.lastPos)/dt
                aiV=d.aiVel:Lerp(aiV, 0.86)
                d.lastPos=bp.Position d.lastTime=now d.realVel=bp.AssemblyLinearVelocity
                local speed=math.max(d.aiVel.Magnitude, d.realVel.Magnitude)
                if d.lastSpeed<13 and speed>26 then
                    d.shotTime=now
                    local nearest=nil
                    local nearestDist=999
                    for _,pl in ipairs(Players:GetPlayers()) do
                        if pl.Character and pl.Character:FindFirstChild("HumanoidRootPart") then
                            local hrp=pl.Character.HumanoidRootPart
                            local dist=(hrp.Position-bp.Position).Magnitude
                            if dist<nearestDist and dist<16 then nearestDist=dist nearest=pl end
                        end
                    end
                    if nearest then
                        d.shooterName=nearest.Name
                        local hrp=nearest.Character:FindFirstChild("HumanoidRootPart")
                        if hrp then d.shooterLook=hrp.CFrame.LookVector end
                        print(string.format("[V17-MIN] SHOT by %s dist %.1f speed %.0f", nearest.Name, nearestDist, speed))
                    else
                        print(string.format("[V17-MIN] SHOT %s %.0f->%.0f", bp.Parent.Name, d.lastSpeed, speed))
                    end
                end
                d.lastSpeed=speed
                table.insert(d.history,{vel=d.aiVel,t=now})
                if #d.history>18 then table.remove(d.history,1) end
            end
        end
    end
    for p,_ in pairs(TrackedBalls) do if not p.Parent then TrackedBalls[p]=nil end end
end

local function classifyAndPredict(data, relPos, relVel, timeTo)
    local typ="GROUND"
    local curveCorr=0
    local conf=1.0
    local shooterOffset=0
    local futureY=relPos.Y + relVel.Y*timeTo + 0.5*(-30)*timeTo*timeTo
    
    if #data.history>=5 then
        local o=data.history[1].vel
        local n=data.history[#data.history].vel
        if o.Magnitude>1 and n.Magnitude>1 then
            local dot=math.clamp(o.Unit:Dot(n.Unit),-1,1)
            local ang=math.deg(math.acos(dot))
            if HRP then
                local delta=n-o
                local relDelta=HRP.CFrame:VectorToObjectSpace(delta)
                if math.abs(relDelta.X)>15 and ang>6 and ang<38 then
                    typ="CURVE"
                    curveCorr=relDelta.X*0.48
                end
                if ang>31 then
                    typ="KNUCKLE"
                    conf=0.58
                end
            end
        end
    end
    
    if data.shooterLook and tick()-data.shotTime<0.75 and HRP then
        local relLook=HRP.CFrame:VectorToObjectSpace(data.shooterLook)
        shooterOffset=relLook.X*3.1*timeTo
    end
    
    local futureX=relPos.X + relVel.X*timeTo + curveCorr*0.5*timeTo*timeTo + shooterOffset
    if conf<0.8 then futureX=futureX*0.72 end
    
    if goalCenter then
        local toGoal=goalCenter - data.part.Position
        if toGoal.Magnitude>5 and toGoal.Magnitude<360 then
            local relGoal=HRP.CFrame:PointToObjectSpace(goalCenter)
            if conf<0.75 then
                futureX=futureX*0.80 + relGoal.X*0.20
            end
        end
    end
    
    return typ, futureX, futureY, conf, curveCorr, shooterOffset
end

local function getThreat()
    if not HRP then return nil end
    local best=nil
    local bestScore=-9999
    for part,data in pairs(TrackedBalls) do
        if part and part.Parent then
            local vel=data.aiVel
            if data.realVel.Magnitude>vel.Magnitude+12 then vel=data.realVel end
            local speed=vel.Magnitude
            if speed>=Settings.MinSpeed then
                local pos=part.Position
                local toP=HRP.Position-pos
                local dist=toP.Magnitude
                if dist<=Settings.TriggerDist then
                    local approach=vel:Dot(toP.Unit)
                    if approach>0.1 then
                        local shotRecent=tick()-data.shotTime<2.0
                        local isDrib=false
                        if not shotRecent then
                            for _,pl in ipairs(Players:GetPlayers()) do
                                if pl~=LocalPlayer and pl.Character and pl.Character:FindFirstChild("HumanoidRootPart") then
                                    if (pl.Character.HumanoidRootPart.Position-pos).Magnitude<8.5 and speed<21 then isDrib=true break end
                                end
                            end
                            if not isDrib and HRP and (HRP.Position-pos).Magnitude<8.5 and speed<5.5 then isDrib=true end
                        end
                        if not isDrib then
                            local timeTo=dist/math.max(speed,4.5)
                            if timeTo<=5.0 then
                                local relP=HRP.CFrame:PointToObjectSpace(pos)
                                local relV=HRP.CFrame:VectorToObjectSpace(vel)
                                local typ, futureX, futureY, conf, curve, shooterOff=classifyAndPredict(data, relP, relV, timeTo)
                                local absX=math.abs(futureX)
                                -- FIXED: was MinOffset 0.35, now 0.12, so center shots still count
                                if absX>=Settings.MinOffset and absX<=50 then
                                    local score=approach*2.35 + speed*0.80 - dist*0.08 - absX*0.05
                                    if shotRecent then score=score+130 end
                                    if dist>110 then score=score+38 end
                                    if typ=="CURVE" then score=score+20 end
                                    if score>bestScore then
                                        bestScore=score
                                        -- If very central, use central block (0) not full side dive
                                        local dir=futureX>0 and 1 or -1
                                        if absX < Settings.CentralThreshold then dir=0 end
                                        best={part=part,vel=vel,speed=speed,dist=dist,timeTo=timeTo,futureX=futureX,futureY=futureY,dir=dir,score=score,name=part.Parent.Name,typ=typ,conf=conf,curve=curve,shooterOff=shooterOff,shotRecent=shotRecent,shooterName=data.shooterName or "?"}
                                    end
                                end
                            end
                        end
                    end
                end
            end
        end
    end
    return best
end

local function getPerfectMoment(th)
    local base=0.52
    if th.speed>=68 then base=0.36
    elseif th.speed>=44 then base=0.52
    elseif th.speed>=28 then base=0.68
    else base=0.86 end
    if th.dist>120 then base=base+0.10 end
    if th.dist>200 then base=base+0.08 end
    base=base + math.abs(th.futureX)*0.014
    if th.typ=="CURVE" then base=base+0.08 end
    if th.typ=="KNUCKLE" then base=0.40 end
    if th.dist<20 or th.timeTo<0.44 then base=999 end
    return base
end

local trajFolder=Workspace:FindFirstChild("V17_Traj")
if not trajFolder then trajFolder=Instance.new("Folder") trajFolder.Name="V17_Traj" trajFolder.Parent=Workspace end
local b0=Instance.new("Part") b0.Anchored=true b0.CanCollide=false b0.Transparency=1 b0.Size=Vector3.new(0.1,0.1,0.1) b0.Parent=trajFolder
local b1=Instance.new("Part") b1.Anchored=true b1.CanCollide=false b1.Transparency=1 b1.Size=Vector3.new(0.1,0.1,0.1) b1.Parent=trajFolder
local a0=Instance.new("Attachment",b0) local a1=Instance.new("Attachment",b1)
local beam=Instance.new("Beam") beam.Attachment0=a0 beam.Attachment1=a1 beam.Width0=0.24 beam.Width1=0.24 beam.FaceCamera=true beam.LightEmission=1 beam.Enabled=false beam.Parent=b0
local marker=Instance.new("Part") marker.Anchored=true marker.CanCollide=false marker.Shape=Enum.PartType.Ball marker.Material=Enum.Material.Neon marker.Size=Vector3.new(1.4,1.4,1.4) marker.Transparency=1 marker.Parent=trajFolder
local bill=Instance.new("BillboardGui") bill.Size=UDim2.new(0,280,0,75) bill.StudsOffset=Vector3.new(0,3.5,0) bill.AlwaysOnTop=true bill.Parent=marker
local label=Instance.new("TextLabel") label.Size=UDim2.new(1,0,1,0) label.BackgroundTransparency=0.15 label.BackgroundColor3=Color3.fromRGB(0,0,0) label.TextColor3=Color3.new(1,1,1) label.TextScaled=true label.TextWrapped=true label.Parent=bill

RunService.Heartbeat:Connect(function()
    pcall(function()
        updateTrack()
        local th=getThreat()
        if Settings.Trajectory and th then
            b0.CFrame=CFrame.new(th.part.Position)
            b1.CFrame=CFrame.new(th.part.Position + th.vel*th.timeTo)
            beam.Enabled=true
            marker.CFrame=CFrame.new(th.part.Position + th.vel*th.timeTo)
            marker.Transparency=0.28
            if th.speed>60 then beam.Color=ColorSequence.new(Color3.fromRGB(255,50,50)) marker.Color=Color3.fromRGB(255,50,50)
            elseif th.typ=="CURVE" then beam.Color=ColorSequence.new(Color3.fromRGB(255,210,60)) marker.Color=Color3.fromRGB(255,210,60)
            elseif th.typ=="KNUCKLE" then beam.Color=ColorSequence.new(Color3.fromRGB(190,70,255)) marker.Color=Color3.fromRGB(190,70,255)
            else beam.Color=ColorSequence.new(Color3.fromRGB(0,255,130)) marker.Color=Color3.fromRGB(0,255,130) end
            local dirStr=th.dir==0 and "CENTER" or th.dir>0 and "→RIGHT" or "←LEFT"
            label.Text=string.format("%s %s | %.0f | %s | shooter:%s | FY%.1f | T%.2f->%.2f%s", th.typ, dirStr, th.speed, th.name, th.shooterName or "?", th.futureY, th.timeTo, getPerfectMoment(th), th.shotRecent and " SHOT!" or "")
        else
            if beam then beam.Enabled=false end
            if marker then marker.Transparency=1 end
        end
        if not Settings.Enabled or diving or not th then return end
        local perfect=getPerfectMoment(th)
        if th.timeTo <= perfect then
            print(string.format("[V17-MIN] PERFECT NOW! %s %s D%.0f S%.0f FY%.1f T%.2f <= %.2f dir=%d", th.name, th.typ, th.dist, th.speed, th.futureY, th.timeTo, perfect, th.dir))
            dive(th.dir, string.format("%s %s D%.0f S%.0f FY%.1f T%.2f perf %.2f %s dir=%d", th.name, th.typ, th.dist, th.speed, th.futureY, th.timeTo, perfect, th.shotRecent and "SHOT!" or "", th.dir))
        end
    end)
end)

task.spawn(function()
    task.wait(1)
    notify("V17 MIN TEST", "RIGHT")
    dive(1, "TEST RIGHT V17 MIN")
    task.wait(3.2)
    dive(0, "TEST CENTER BLOCK - fixes through middle")
    task.wait(2)
    dive(-1, "TEST LEFT")
    task.wait(1)
    notify("V17 MIN READY", "MinOffset 0.12 + Center 1.8 + W forward = no more through")
    print("=== V17 FIXED MINIMAL LOADED - same as V17 but MinOffset 0.12 + central block ===")
end)

Workspace.ChildAdded:Connect(function(c) if isBall(c) then task.wait(0.08) local p=getPart(c) if p then TrackedBalls[p]={part=p,lastPos=p.Position,lastTime=tick(),aiVel=Vector3.new(0,0,0),realVel=p.AssemblyLinearVelocity,lastSpeed=0,shotTime=0,history={},shooterName=nil,shooterLook=nil} end end end)

UIS.InputBegan:Connect(function(inp,gp)
    if gp then return end
    if inp.KeyCode==Enum.KeyCode.H then dive(1,"MANUAL RIGHT")
    elseif inp.KeyCode==Enum.KeyCode.J then dive(-1,"MANUAL LEFT")
    elseif inp.KeyCode==Enum.KeyCode.M then dive(0,"MANUAL CENTER BLOCK")
    elseif inp.KeyCode==Enum.KeyCode.Y then print("=== Y SCAN V17 MIN ===") local all=scanBalls() print("Found",#all) for _,p in ipairs(all) do local d=TrackedBalls[p] print(p.Parent.Name, "Dist", HRP and math.floor((p.Position-HRP.Position).Magnitude) or 0, "Speed", d and math.floor(math.max(d.aiVel.Magnitude,d.realVel.Magnitude)) or 0) end
    elseif inp.KeyCode==Enum.KeyCode.P then Settings.Trajectory=not Settings.Trajectory notify("Trajectory", Settings.Trajectory and "ON" or "OFF") if not Settings.Trajectory then beam.Enabled=false marker.Transparency=1 end
    elseif inp.KeyCode==Enum.KeyCode.G then Settings.Enabled=not Settings.Enabled notify("Auto", Settings.Enabled and "ON" or "OFF") end
end)

notify("V17 MIN LOADED", "Same as V17 + MinOffset 0.12 + center block")

Features & Information

tutorial: press 5 on your keyboard (pc only script) then execute the script and enjoy also the script will probably only work in real matches because in public there are multiple balls
#skibidi auto dive

Community Comments (0)

No comments yet for this script.

More Scripts for Universal Scripts