ColdSpecs

Final product (remade)

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