--[[ KNOCKOUT PREDICTOR — PLANET VERSION Follows camera direction when not moving ]] local Players = cloneref(game:GetService("Players")) local RunService = cloneref(game:GetService("RunService")) local ReplicatedStorage = cloneref(game:GetService("ReplicatedStorage")) local LP = Players.LocalPlayer local Camera = workspace.CurrentCamera local BASE_SPEED = 7.84 local SPEED_STEP = 2.85 local FRICTION = 6.3 local powerLevel = 1 local ok, Bindables = pcall(function() return ReplicatedStorage:WaitForChild("Bindables", 5) end) if ok and Bindables then local ev = Bindables:FindFirstChild("PowerChanged") if ev then ev.Event:Connect(function(n) powerLevel = n end) end end if _G.KO_CONN then pcall(function() _G.KO_CONN:Disconnect() end) end if _G.KO_PARTS then for _,p in ipairs(_G.KO_PARTS) do pcall(function() p:Destroy() end) end end local RED = Color3.fromRGB(255, 40, 40) local function neon(sz, col, shape) local p = Instance.new("Part") p.Size = sz; p.Color = col or RED p.Material = Enum.Material.Neon p.Anchored = true; p.CanCollide = false p.CastShadow = false; p.Transparency = 1 if shape then p.Shape = shape end p.Parent = workspace return p end local function addOutline(part) local h = Instance.new("Highlight") h.Adornee = part; h.FillTransparency = 1 h.OutlineColor = Color3.new(0, 0, 0) h.OutlineTransparency = 0; h.Parent = part end -- ── PARTS ──────────────────────────────────── local stem = neon(Vector3.new(0.2, 0.2, 1), RED) addOutline(stem) local sphere = neon(Vector3.new(2.2, 2.2, 2.2), RED, Enum.PartType.Ball) addOutline(sphere) local DOT_N = 12 local DOT_R = 2.4 local dots = {} for i = 1, DOT_N do local d = neon(Vector3.new(0.7, 0.7, 0.7), RED, Enum.PartType.Ball) addOutline(d) dots[i] = d end -- ── STATE ──────────────────────────────────── local lastPos = Vector3.new(0, 0, 0) local pulse = 0 -- ── HELPERS ────────────────────────────────── local function flatUnit(v) local flat = Vector3.new(v.X, 0, v.Z) if flat.Magnitude > 0.001 then return flat.Unit end return nil end -- ── MAIN LOOP ──────────────────────────────── _G.KO_CONN = RunService.RenderStepped:Connect(function(dt) pulse = pulse + dt * 1.2 local char = LP.Character local hrp = char and char:FindFirstChild("HumanoidRootPart") if not hrp then stem.Transparency = 1 sphere.Transparency = 1 for _, d in ipairs(dots) do d.Transparency = 1 end return end local curPos = hrp.Position local asmVel = hrp.AssemblyLinearVelocity local posDelta = (curPos - lastPos).Magnitude / math.max(dt, 0.001) lastPos = curPos -- ── DIRECTION ──────────────────────────── -- Always use camera direction as primary source -- This ensures the predictor always follows where you're looking local dir = flatUnit(Camera.CFrame.LookVector) -- If moving fast, use velocity direction instead if asmVel.Magnitude > 3 then local velDir = flatUnit(asmVel) if velDir then dir = velDir end end if not dir then return end -- ── SPEED & DISTANCE ───────────────────── local moving = posDelta > 0.5 local rawSpeed = moving and posDelta or (BASE_SPEED + (powerLevel - 1) * SPEED_STEP) local dist = (rawSpeed * rawSpeed) / (2 * FRICTION) local endPos = Vector3.new( curPos.X + dir.X * dist, curPos.Y, curPos.Z + dir.Z * dist ) local stemDist = (endPos - curPos).Magnitude local ps = 1 + math.sin(pulse * 0.5) * 0.03 -- ── STEM ───────────────────────────────── if stemDist > 0.5 then stem.CFrame = CFrame.new(curPos, endPos) * CFrame.new(0, 0, -stemDist / 2) stem.Size = Vector3.new(0.18, 0.18, stemDist) stem.Transparency = 0.2 else stem.Transparency = 1 end -- ── SPHERE ─────────────────────────────── sphere.Position = endPos + Vector3.new(0, 1.1, 0) sphere.Size = Vector3.new(2.2 * ps, 2.2 * ps, 2.2 * ps) sphere.Transparency = 0.1 -- ── ORBITING DOTS ──────────────────────── local rot = pulse * 0.3 for i = 1, DOT_N do local angle = (i - 1) * (2 * math.pi / DOT_N) + rot local x = endPos.X + DOT_R * math.cos(angle) local z = endPos.Z + DOT_R * math.sin(angle) local y = endPos.Y + 1.1 local sz = 0.65 + math.sin(pulse * 0.6 + i * 0.5) * 0.03 dots[i].CFrame = CFrame.new(x, y, z) dots[i].Size = Vector3.new(sz, sz, sz) dots[i].Transparency = 0.08 end end) _G.KO_PARTS = { stem, sphere } for _, d in ipairs(dots) do table.insert(_G.KO_PARTS, d) end _G.KO_DESTROY = function() if _G.KO_CONN then _G.KO_CONN:Disconnect() end for _, p in ipairs(_G.KO_PARTS or {}) do pcall(function() p:Destroy() end) end print("[KO] Removed") end print("[KO Predictor] Loaded!")