ColdSpecs

Working ( Now needs correct values)

Nov 18th, 2025
39
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 18.78 KB | None | 0 0
  1. -- PAYLOAD0 – POWER-BASED DYNAMIC CALIBRATION
  2. -- Hold F → Auto-Jump + Auto-Shoot
  3. -- Y → Rim Lock / Unlock
  4. -- O → Visuals Toggle
  5. -- Uses live Power → Perfect Distance mapping
  6.  
  7. -- ====================== SERVICES ======================
  8. local Players = game:GetService('Players')
  9. local UserInputService = game:GetService('UserInputService')
  10. local RunService = game:GetService('RunService')
  11. local ReplicatedStorage = game:GetService('ReplicatedStorage')
  12. local CoreGui = game:GetService('CoreGui')
  13. local TweenService = game:GetService('TweenService')
  14. local Workspace = game:GetService('Workspace')
  15. local Camera = Workspace.CurrentCamera
  16.  
  17. -- ====================== LOCALS ========================
  18. local plr = Players.LocalPlayer
  19. local char = plr.Character or plr.CharacterAdded:Wait()
  20. local remotes = ReplicatedStorage:WaitForChild('Remotes')
  21. local shootRemote = remotes:WaitForChild('Shoot')
  22.  
  23. -- ====================== STATE =========================
  24. getgenv().AUTO_JUMP_ACTIVE = false -- Controlled by F hold
  25. local SystemActive = false -- DEFAULT OFF
  26. local VisualsEnabled = true
  27. local shootKey = nil -- captured from legit rc
  28. local selectedRim = nil -- auto-selected rim
  29. local manualRim = nil -- Y-key locked rim
  30. local activeNotifyGui = nil
  31.  
  32. -- F-key hold tracking
  33. local fKeyDown = false
  34.  
  35. -- ====================== CONFIG ========================
  36. local CLAMP_RADIUS = 1
  37. local ACTIVE_RANGE_MAIN = 90
  38. local COLOR_GREEN = Color3.fromRGB(0, 255, 100)
  39. local COLOR_GREEN_SOFT = Color3.fromRGB(0, 200, 80)
  40.  
  41. -- Timing
  42. local PERFECT_TOL = 0.12
  43. local PREDICTIVE_BIAS = 2.0
  44. local MIN_JUMP_VELOCITY = 2.2
  45. local SINGLE_SHOT_PER_JUMP = true
  46.  
  47. -- Auto-jump
  48. local AUTOJUMP_PREWINDOW = 4.0
  49. local AUTOJUMP_COOLDOWN = 0.20
  50.  
  51. -- Rim signature
  52. local RimSize =
  53. Vector3.new(3.632131576538086, 0.5587897300720215, 3.632131576538086)
  54.  
  55. -- ================== POWER SYSTEM ======================
  56. -- Dynamic Calibration / Power-Based Range Calibration
  57. -- Tracks live Power so perfect distance auto-updates
  58.  
  59. local currentPower = 0
  60.  
  61. local function attachPowerListener(character: Model)
  62. if not character then
  63. return
  64. end
  65. task.spawn(function()
  66. local ev = character:FindFirstChild('E_V')
  67. or character:WaitForChild('E_V', 10)
  68. if not ev then
  69. return
  70. end
  71. local power = ev:FindFirstChild('Power') or ev:WaitForChild('Power', 10)
  72. if not power or not power.Value then
  73. return
  74. end
  75.  
  76. currentPower = power.Value
  77.  
  78. power:GetPropertyChangedSignal('Value'):Connect(function()
  79. currentPower = power.Value
  80. end)
  81. end)
  82. end
  83.  
  84. attachPowerListener(char)
  85. plr.CharacterAdded:Connect(function(c2)
  86. char = c2
  87. attachPowerListener(c2)
  88. end)
  89.  
  90. -- Power → Perfect Distance Map (edit these to match your game)
  91. local POWER_TO_DISTANCE = {
  92. [75] = 54.97,
  93. [80] = 61.53,
  94. [85] = 68.10,
  95. }
  96.  
  97. local function getTargetDistance()
  98. return POWER_TO_DISTANCE[currentPower] or nil
  99. end
  100.  
  101. -- ====================== HELPERS =======================
  102. local function hasBall()
  103. local c = plr.Character
  104. if not c then
  105. return false
  106. end
  107. for _, tool in ipairs(c:GetChildren()) do
  108. if tool:IsA('Tool') and tool.Name:lower():find('ball') then
  109. return true
  110. end
  111. end
  112. return false
  113. end
  114.  
  115. local function notify(msg, color)
  116. if activeNotifyGui and activeNotifyGui.Parent then
  117. activeNotifyGui:Destroy()
  118. end
  119. local gui = Instance.new('ScreenGui')
  120. gui.ResetOnSpawn = false
  121. gui.Name = 'PAYLOAD0_Toast'
  122. gui.Parent = CoreGui
  123. activeNotifyGui = gui
  124.  
  125. local label = Instance.new('TextLabel')
  126. label.AnchorPoint = Vector2.new(0.5, 0.5)
  127. label.Position = UDim2.new(0.5, 0, 0.9, 0)
  128. label.Size = UDim2.new(0, 560, 0, 38)
  129. label.BackgroundTransparency = 1
  130. label.Font = Enum.Font.Code
  131. label.TextSize = 26
  132. label.TextColor3 = color or Color3.fromRGB(255, 255, 255)
  133. label.Text = msg
  134. label.Parent = gui
  135.  
  136. task.delay(1.0, function()
  137. if gui == activeNotifyGui then
  138. gui:Destroy()
  139. activeNotifyGui = nil
  140. end
  141. end)
  142. end
  143.  
  144. -- ===== Calibrate UI (remains until shootKey captured) =====
  145. local calibrateGui
  146. local function showCalibrateUI()
  147. if calibrateGui or shootKey or not hasBall() then
  148. return
  149. end
  150. calibrateGui = Instance.new('ScreenGui')
  151. calibrateGui.Name = 'CalibrateReminder'
  152. calibrateGui.ResetOnSpawn = false
  153. calibrateGui.IgnoreGuiInset = true
  154. calibrateGui.Parent = CoreGui
  155.  
  156. local frame = Instance.new('Frame')
  157. frame.AnchorPoint = Vector2.new(0.5, 0.5)
  158. frame.Position = UDim2.new(0.5, 0, 0.85, 0)
  159. frame.Size = UDim2.new(0, 420, 0, 45)
  160. frame.BackgroundTransparency = 0.25
  161. frame.BackgroundColor3 = Color3.fromRGB(20, 20, 20)
  162. frame.BorderSizePixel = 0
  163. frame.Parent = calibrateGui
  164.  
  165. local stroke = Instance.new('UIStroke')
  166. stroke.Color = Color3.fromRGB(80, 255, 120)
  167. stroke.Thickness = 1.6
  168. stroke.Parent = frame
  169.  
  170. local corner = Instance.new('UICorner')
  171. corner.CornerRadius = UDim.new(0, 10)
  172. corner.Parent = frame
  173.  
  174. local label = Instance.new('TextLabel')
  175. label.BackgroundTransparency = 1
  176. label.Size = UDim2.fromScale(1, 1)
  177. label.Font = Enum.Font.GothamMedium
  178. label.TextSize = 22
  179. label.TextColor3 = Color3.fromRGB(120, 255, 150)
  180. label.Text = 'Click once to calibrate your shot (key capture).'
  181. label.Parent = frame
  182.  
  183. task.spawn(function()
  184. while calibrateGui and not shootKey and hasBall() do
  185. TweenService:Create(
  186. label,
  187. TweenInfo.new(0.6, Enum.EasingStyle.Sine),
  188. { TextTransparency = 0.25 }
  189. ):Play()
  190. task.wait(0.6)
  191. TweenService:Create(
  192. label,
  193. TweenInfo.new(0.6, Enum.EasingStyle.Sine),
  194. { TextTransparency = 0 }
  195. ):Play()
  196. task.wait(0.6)
  197. end
  198. end)
  199. end
  200.  
  201. local function removeCalibrateUI()
  202. if calibrateGui then
  203. calibrateGui:Destroy()
  204. calibrateGui = nil
  205. end
  206. end
  207.  
  208. task.spawn(function()
  209. while task.wait(0.4) do
  210. if not hasBall() or shootKey then
  211. removeCalibrateUI()
  212. else
  213. showCalibrateUI()
  214. end
  215. end
  216. end)
  217.  
  218. -- ===== Capture shootKey from remote =====
  219. local oldNamecall
  220. oldNamecall = hookmetamethod(game, '__namecall', function(self, ...)
  221. local m = getnamecallmethod()
  222. if m == 'FireServer' and self == shootRemote then
  223. local args = { ... }
  224. if type(args[3]) == 'string' and not shootKey then
  225. shootKey = args[3]
  226. removeCalibrateUI()
  227. notify('Shoot key captured!', COLOR_GREEN)
  228. end
  229. end
  230. return oldNamecall(self, ...)
  231. end)
  232.  
  233. -- ===== Rim tracking =====
  234. local Rims = {}
  235.  
  236. Workspace.DescendantAdded:Connect(function(o)
  237. if o:IsA('BasePart') and o.Name == 'Rim' and o.Size == RimSize then
  238. table.insert(Rims, o)
  239. end
  240. end)
  241. for _, v in ipairs(Workspace:GetDescendants()) do
  242. if v:IsA('BasePart') and v.Name == 'Rim' and v.Size == RimSize then
  243. table.insert(Rims, v)
  244. end
  245. end
  246. Workspace.DescendantRemoving:Connect(function(o)
  247. for i, rim in ipairs(Rims) do
  248. if rim == o then
  249. table.remove(Rims, i)
  250. break
  251. end
  252. end
  253. if selectedRim == o then
  254. selectedRim = nil
  255. end
  256. if manualRim == o then
  257. manualRim = nil
  258. end
  259. end)
  260.  
  261. local function getLolChild(rim)
  262. if not rim or not rim:IsDescendantOf(Workspace) then
  263. return nil
  264. end
  265. for _, ch in ipairs(rim:GetChildren()) do
  266. if ch:IsA('BasePart') and ch.Name == 'Lol' then
  267. return ch
  268. end
  269. end
  270. local p = rim.Parent
  271. if p then
  272. local c = p:FindFirstChild('Lol')
  273. if c and c:IsA('BasePart') then
  274. return c
  275. end
  276. end
  277. return nil
  278. end
  279.  
  280. -- ===== Rim Lock Visuals (Y key) =====
  281. local function clearRimLockVisual(rim)
  282. if rim and rim:FindFirstChild('RimLockBillboard') then
  283. rim.RimLockBillboard:Destroy()
  284. end
  285. if rim and rim:FindFirstChild('RimSelectionBox') then
  286. rim.RimSelectionBox:Destroy()
  287. end
  288. end
  289.  
  290. local function makeLockVisual(target)
  291. local bb = Instance.new('BillboardGui')
  292. bb.Name = 'RimLockBillboard'
  293. bb.Size = UDim2.fromOffset(100, 24)
  294. bb.AlwaysOnTop = true
  295. bb.LightInfluence = 0
  296. bb.StudsOffsetWorldSpace = Vector3.new(0, 1.5, 0)
  297. bb.Parent = target
  298.  
  299. local tl = Instance.new('TextLabel')
  300. tl.BackgroundTransparency = 1
  301. tl.Size = UDim2.fromScale(1, 1)
  302. tl.Font = Enum.Font.GothamBold
  303. tl.TextSize = 16
  304. tl.Text = 'LOCKED'
  305. tl.TextColor3 = Color3.fromRGB(120, 255, 150)
  306. tl.Parent = bb
  307.  
  308. local sb = Instance.new('SelectionBox')
  309. sb.Name = 'RimSelectionBox'
  310. sb.Adornee = target
  311. sb.LineThickness = 0.02
  312. sb.SurfaceTransparency = 1
  313. sb.Parent = target
  314. end
  315.  
  316. local function setManualRim(rim)
  317. if manualRim == rim then
  318. return
  319. end
  320. if manualRim then
  321. clearRimLockVisual(manualRim)
  322. end
  323. manualRim = rim
  324. if manualRim and manualRim:IsDescendantOf(Workspace) then
  325. makeLockVisual(manualRim)
  326. notify('Locked to hoop (Y)', COLOR_GREEN)
  327. else
  328. notify('Auto rim mode', Color3.fromRGB(180, 180, 180))
  329. end
  330. end
  331.  
  332. -- ===== INPUT: F Hold + Y Lock + O Visuals =====
  333. UserInputService.InputBegan:Connect(function(i, gp)
  334. if gp then
  335. return
  336. end
  337.  
  338. if i.KeyCode == Enum.KeyCode.F then
  339. if not fKeyDown then
  340. fKeyDown = true
  341. SystemActive = true
  342. getgenv().AUTO_JUMP_ACTIVE = true
  343. notify('✅ System ON (Hold F)', COLOR_GREEN)
  344. end
  345. elseif i.KeyCode == Enum.KeyCode.Y then
  346. -- Y = Lock nearest visible rim
  347. local mousePos = UserInputService:GetMouseLocation()
  348. local best, bestPixels = nil, 96
  349. for _, rim in ipairs(Rims) do
  350. if rim:IsDescendantOf(Workspace) then
  351. local v3, on = Camera:WorldToViewportPoint(rim.Position)
  352. if on then
  353. local dx, dy = v3.X - mousePos.X, v3.Y - mousePos.Y
  354. local d = math.sqrt(dx * dx + dy * dy)
  355. if d < bestPixels then
  356. best, bestPixels = rim, d
  357. end
  358. end
  359. end
  360. end
  361. if best then
  362. if manualRim == best then
  363. setManualRim(nil)
  364. else
  365. setManualRim(best)
  366. end
  367. else
  368. notify('No hoop near cursor', Color3.fromRGB(255, 120, 120))
  369. end
  370. elseif i.KeyCode == Enum.KeyCode.O then
  371. VisualsEnabled = not VisualsEnabled
  372. notify(
  373. VisualsEnabled and '👁 Visuals ON' or '🙈 Visuals OFF',
  374. VisualsEnabled and COLOR_GREEN or Color3.fromRGB(255, 80, 80)
  375. )
  376. end
  377. end)
  378.  
  379. UserInputService.InputEnded:Connect(function(i, gp)
  380. if gp then
  381. return
  382. end
  383. if i.KeyCode == Enum.KeyCode.F then
  384. if fKeyDown then
  385. fKeyDown = false
  386. SystemActive = false
  387. getgenv().AUTO_JUMP_ACTIVE = false
  388. notify('🚫 System OFF (F released)', Color3.fromRGB(255, 80, 80))
  389. end
  390. end
  391. end)
  392.  
  393. -- ===== Auto rim selector (when not locked) =====
  394. task.spawn(function()
  395. while task.wait(0.085) do
  396. if not SystemActive or manualRim then
  397. continue
  398. end
  399. local root = plr.Character
  400. and plr.Character:FindFirstChild('HumanoidRootPart')
  401. if not root then
  402. continue
  403. end
  404. local bestRim, bestDist = nil, 85
  405. for _, rim in ipairs(Rims) do
  406. if rim:IsDescendantOf(Workspace) then
  407. local dist = (rim.Position - root.Position).Magnitude
  408. if dist < bestDist then
  409. local _, on = Camera:WorldToViewportPoint(rim.Position)
  410. if on then
  411. bestRim, bestDist = rim, dist
  412. end
  413. end
  414. end
  415. end
  416. if bestRim and bestRim ~= selectedRim then
  417. selectedRim = bestRim
  418. end
  419. end
  420. end)
  421.  
  422. local function currentTargetRim()
  423. return manualRim or selectedRim
  424. end
  425.  
  426. -- ===== Aim model =====
  427. local lastTick, moveOffset = 0, Vector3.zero
  428. local function computeOffset()
  429. if tick() - lastTick > 0.09 then
  430. local hum = plr.Character
  431. and plr.Character:FindFirstChildOfClass('Humanoid')
  432. local moveDir = (hum and hum.MoveDirection) or Vector3.zero
  433. moveOffset = Vector3.new(moveDir.X * 1.5, 0, moveDir.Z * 1.5)
  434. lastTick = tick()
  435. end
  436. return moveOffset
  437. end
  438.  
  439. local function computeArc(dist)
  440. return Vector3.new(0, 43 + (dist / 15), 0)
  441. end
  442.  
  443. local function planarDistance(a: Vector3, b: Vector3)
  444. local dx, dz = a.X - b.X, a.Z - b.Z
  445. return math.sqrt(dx * dx + dz * dz)
  446. end
  447.  
  448. local function smartAim(rim: BasePart)
  449. local offset = computeOffset()
  450. local root = plr.Character
  451. and plr.Character:FindFirstChild('HumanoidRootPart')
  452. if not root then
  453. return rim.Position
  454. end
  455. local dist = (root.Position - rim.Position).Magnitude
  456. return rim.Position + computeArc(dist) - offset
  457. end
  458.  
  459. local function shootAtTarget()
  460. if not (SystemActive and shootKey and hasBall()) then
  461. return
  462. end
  463. local rim = currentTargetRim()
  464. if not (rim and rim:IsDescendantOf(Workspace)) then
  465. return
  466. end
  467.  
  468. local c = plr.Character
  469. if not c then
  470. return
  471. end
  472. local head = c:FindFirstChild('Head')
  473. local root = c.PrimaryPart
  474. if not (head and root) then
  475. return
  476. end
  477.  
  478. local aimPos = smartAim(rim)
  479. local dir = (aimPos - head.Position).Unit
  480. local shootFrom = root.Position + dir * 4
  481. shootRemote:FireServer(aimPos, shootFrom, shootKey)
  482. end
  483.  
  484. -- ===== Visual cue =====
  485. local hl = CoreGui:FindFirstChild('PerfectRangeGlow')
  486. or Instance.new('Highlight')
  487. hl.Name = 'PerfectRangeGlow'
  488. hl.DepthMode = Enum.HighlightDepthMode.AlwaysOnTop
  489. hl.FillTransparency = 0.25
  490. hl.OutlineTransparency = 0
  491. hl.Adornee = plr.Character
  492. hl.Parent = CoreGui
  493. hl.Enabled = false
  494.  
  495. plr.CharacterAdded:Connect(function(c2)
  496. task.wait(0.5)
  497. hl.Adornee = c2
  498. end)
  499.  
  500. -- ===== Per-jump state =====
  501. local perJumpShotDone = false
  502. local lastJumpAssistAt = 0
  503. local wasOutside = true
  504.  
  505. local function resetJumpFlags()
  506. perJumpShotDone = false
  507. end
  508. plr.CharacterAdded:Connect(function()
  509. task.wait(0.5)
  510. resetJumpFlags()
  511. end)
  512.  
  513. local function isAirborne(hum: Humanoid?)
  514. if not hum then
  515. return false
  516. end
  517. local st = hum:GetState()
  518. return not (
  519. st == Enum.HumanoidStateType.Running
  520. or st == Enum.HumanoidStateType.RunningNoPhysics
  521. or st == Enum.HumanoidStateType.Landed
  522. or st == Enum.HumanoidStateType.Seated
  523. )
  524. end
  525.  
  526. -- ===== Core loop (RenderStepped) =====
  527. RunService.RenderStepped:Connect(function(dt)
  528. if not SystemActive then
  529. hl.Enabled = false
  530. return
  531. end
  532.  
  533. local c = plr.Character
  534. local hum = c and c:FindFirstChildOfClass('Humanoid')
  535. local root = c
  536. and (
  537. c:FindFirstChild('HumanoidRootPart')
  538. or c:FindFirstChildWhichIsA('BasePart')
  539. )
  540. if not (hum and root) then
  541. hl.Enabled = false
  542. return
  543. end
  544.  
  545. local rim = currentTargetRim()
  546. if not rim or not rim:IsDescendantOf(Workspace) then
  547. hl.Enabled = false
  548. return
  549. end
  550.  
  551. local lol = getLolChild(rim)
  552. local refPos = (lol and lol.Position) or rim.Position
  553.  
  554. local dist = planarDistance(root.Position, refPos)
  555. if dist > ACTIVE_RANGE_MAIN then
  556. hl.Enabled = false
  557. return
  558. end
  559.  
  560. -- Power-based target distance
  561. local target = getTargetDistance()
  562. if not target then
  563. hl.Enabled = false
  564. return
  565. end
  566.  
  567. local diff = dist - target
  568. local absDiff = math.abs(diff)
  569.  
  570. -- Visuals
  571. if VisualsEnabled then
  572. if absDiff <= PERFECT_TOL then
  573. hl.Enabled = true
  574. hl.FillColor, hl.OutlineColor = COLOR_GREEN, COLOR_GREEN
  575. elseif absDiff < CLAMP_RADIUS then
  576. hl.Enabled = true
  577. hl.FillColor, hl.OutlineColor = COLOR_GREEN_SOFT, COLOR_GREEN_SOFT
  578. else
  579. hl.Enabled = false
  580. end
  581. else
  582. hl.Enabled = false
  583. end
  584.  
  585. local vel = root.AssemblyLinearVelocity or root.Velocity
  586. local yVel = vel.Y
  587. local airborne = (yVel > MIN_JUMP_VELOCITY) or isAirborne(hum)
  588.  
  589. -- Auto-jump (front-entry only)
  590. if hasBall() and getgenv().AUTO_JUMP_ACTIVE and not airborne then
  591. local enteringFromFront = (diff > 0)
  592. and (diff <= AUTOJUMP_PREWINDOW)
  593. and wasOutside
  594. if
  595. enteringFromFront
  596. and (time() - lastJumpAssistAt > AUTOJUMP_COOLDOWN)
  597. then
  598. hum:ChangeState(Enum.HumanoidStateType.Jumping)
  599. lastJumpAssistAt = time()
  600. wasOutside = false
  601. elseif diff > AUTOJUMP_PREWINDOW then
  602. wasOutside = true
  603. elseif diff < 0 then
  604. wasOutside = false
  605. end
  606. else
  607. wasOutside = (diff > AUTOJUMP_PREWINDOW)
  608. end
  609.  
  610. -- Auto-shoot (power-calibrated)
  611. if
  612. hasBall()
  613. and airborne
  614. and shootKey
  615. and not (SINGLE_SHOT_PER_JUMP and perJumpShotDone)
  616. then
  617. local target2 = getTargetDistance()
  618. if not target2 then
  619. return
  620. end
  621.  
  622. local predictedPos = root.Position + vel * dt
  623. local pDist = planarDistance(predictedPos, refPos)
  624.  
  625. if math.abs(pDist - target2) <= (PERFECT_TOL * PREDICTIVE_BIAS) then
  626. shootAtTarget()
  627. perJumpShotDone = true
  628. return
  629. end
  630.  
  631. if absDiff <= PERFECT_TOL then
  632. shootAtTarget()
  633. perJumpShotDone = true
  634. return
  635. end
  636. end
  637. end)
  638.  
  639. -- Reset on land
  640. task.spawn(function()
  641. local lastState
  642. while task.wait(0.02) do
  643. local hum = plr.Character
  644. and plr.Character:FindFirstChildOfClass('Humanoid')
  645. if hum then
  646. local st = hum:GetState()
  647. if st ~= lastState then
  648. if
  649. st == Enum.HumanoidStateType.Landed
  650. or st == Enum.HumanoidStateType.Running
  651. or st == Enum.HumanoidStateType.Seated
  652. then
  653. resetJumpFlags()
  654. end
  655. lastState = st
  656. end
  657. end
  658. end
  659. end)
  660.  
Advertisement
Add Comment
Please, Sign In to add comment