ColdSpecs

Full Aim (Possible to fix LBU)

Nov 2nd, 2025
36
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.08 KB | None | 0 0
  1. local Players = game:GetService('Players')
  2. local UserInputService = game:GetService('UserInputService')
  3. local RunService = game:GetService('RunService')
  4. local ReplicatedStorage = game:GetService('ReplicatedStorage')
  5. local CoreGui = game:GetService('CoreGui')
  6. local TweenService = game:GetService('TweenService')
  7. local Workspace = game:GetService('Workspace')
  8. local Camera = workspace.CurrentCamera
  9.  
  10. local plr = Players.LocalPlayer
  11. local char = plr.Character or plr.CharacterAdded:Wait()
  12. local remotes = ReplicatedStorage:WaitForChild('Remotes')
  13. local shootRemote = remotes:WaitForChild('Shoot')
  14.  
  15. -- === STATE ===
  16. getgenv().PAYLOAD0_SYSTEM_ACTIVE = true
  17. local VisualsEnabled = true
  18. local shootKey: string? = nil
  19. local selectedRim: BasePart? = nil
  20. local activeNotifyGui
  21.  
  22. -- === CONFIGURATION ===
  23. local PERFECT_DISTANCES = { 54.97, 61.53, 68.10 }
  24. local CLAMP_RADIUS = 1
  25. local ACTIVE_RANGE_MAIN = 90
  26. local MAX_PUSH = 0.06
  27. local DAMPING = 0.9
  28.  
  29. local COLOR_GREEN = Color3.fromRGB(0, 255, 100)
  30. local COLOR_GREEN_SOFT = Color3.fromRGB(0, 200, 80)
  31.  
  32. -- === HELPER: BALL CHECK ===
  33. local function hasBall()
  34. local char = plr.Character
  35. if not char then
  36. return false
  37. end
  38. for _, tool in ipairs(char:GetChildren()) do
  39. if tool:IsA('Tool') and tool.Name:lower():find('ball') then
  40. return true
  41. end
  42. end
  43. return false
  44. end
  45.  
  46. -- === NOTIFY SYSTEM ===
  47. local function notify(msg, color)
  48. if activeNotifyGui and activeNotifyGui.Parent then
  49. activeNotifyGui:Destroy()
  50. end
  51. local gui = Instance.new('ScreenGui', CoreGui)
  52. gui.ResetOnSpawn = false
  53. activeNotifyGui = gui
  54.  
  55. local label = Instance.new('TextLabel', gui)
  56. label.AnchorPoint = Vector2.new(0.5, 0.5)
  57. label.BackgroundTransparency = 1
  58. label.TextColor3 = color or Color3.fromRGB(255, 255, 255)
  59. label.Font = Enum.Font.Code
  60. label.TextSize = 26
  61. label.Text = msg
  62. label.Position = UDim2.new(0.5, 0, 0.9, 0)
  63.  
  64. task.spawn(function()
  65. task.wait(1.2)
  66. if gui == activeNotifyGui then
  67. gui:Destroy()
  68. activeNotifyGui = nil
  69. end
  70. end)
  71. end
  72.  
  73. -- === CALIBRATE UI ===
  74. local calibrateGui
  75. local function showCalibrateUI()
  76. if calibrateGui or shootKey or not hasBall() then
  77. return
  78. end
  79. calibrateGui = Instance.new('ScreenGui')
  80. calibrateGui.Name = 'CalibrateReminder'
  81. calibrateGui.ResetOnSpawn = false
  82. calibrateGui.IgnoreGuiInset = true
  83. calibrateGui.Parent = CoreGui
  84.  
  85. local frame = Instance.new('Frame')
  86. frame.AnchorPoint = Vector2.new(0.5, 0.5)
  87. frame.Position = UDim2.new(0.5, 0, 0.85, 0)
  88. frame.Size = UDim2.new(0, 420, 0, 45)
  89. frame.BackgroundTransparency = 0.3
  90. frame.BackgroundColor3 = Color3.fromRGB(20, 20, 20)
  91. frame.BorderSizePixel = 0
  92. frame.Parent = calibrateGui
  93.  
  94. local stroke = Instance.new('UIStroke')
  95. stroke.Color = Color3.fromRGB(80, 255, 120)
  96. stroke.Thickness = 1.6
  97. stroke.Parent = frame
  98.  
  99. local corner = Instance.new('UICorner')
  100. corner.CornerRadius = UDim.new(0, 10)
  101. corner.Parent = frame
  102.  
  103. local label = Instance.new('TextLabel')
  104. label.BackgroundTransparency = 1
  105. label.Size = UDim2.new(1, 0, 1, 0)
  106. label.Font = Enum.Font.GothamMedium
  107. label.TextSize = 22
  108. label.TextColor3 = Color3.fromRGB(120, 255, 150)
  109. label.Text = '🏀 Click once to calibrate your shot.'
  110. label.Parent = frame
  111.  
  112. task.spawn(function()
  113. while calibrateGui and not shootKey and hasBall() do
  114. local t1 = TweenService:Create(label, TweenInfo.new(0.8, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { TextTransparency = 0.3 })
  115. local t2 = TweenService:Create(label, TweenInfo.new(0.8, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { TextTransparency = 0 })
  116. t1:Play()
  117. t1.Completed:Wait()
  118. t2:Play()
  119. t2.Completed:Wait()
  120. end
  121. end)
  122. end
  123.  
  124. local function removeCalibrateUI()
  125. if calibrateGui then
  126. calibrateGui:Destroy()
  127. calibrateGui = nil
  128. end
  129. end
  130.  
  131. task.spawn(function()
  132. while task.wait(0.5) do
  133. if not hasBall() or shootKey then
  134. removeCalibrateUI()
  135. else
  136. showCalibrateUI()
  137. end
  138. end
  139. end)
  140.  
  141. -- === DUNKDETECT TRACKING ===
  142. local DUNK_SIZE = Vector3.new(3.8351128101348877, 0.582205057144165, 3.2728888988494873)
  143. local DUNK_NAME = "dunkDetect"
  144. local DunkParts, Markers = {}, {}
  145. selectedRim = nil
  146.  
  147. -- Billboard label for active dunk zone
  148. local labelGui = Instance.new("BillboardGui")
  149. labelGui.Size = UDim2.new(0, 100, 0, 35)
  150. labelGui.StudsOffset = Vector3.new(0, 3.5, 0)
  151. labelGui.AlwaysOnTop = true
  152. labelGui.Enabled = false
  153. local label = Instance.new("TextLabel")
  154. label.BackgroundTransparency = 1
  155. label.TextColor3 = Color3.fromRGB(255, 255, 100)
  156. label.TextStrokeTransparency = 0.1
  157. label.Font = Enum.Font.GothamBold
  158. label.TextSize = 14
  159. label.Text = "Active Dunk Zone"
  160. label.Parent = labelGui
  161. labelGui.Parent = CoreGui
  162.  
  163. local function createMarker(part)
  164. local sphere = Instance.new("Part")
  165. sphere.Shape = Enum.PartType.Ball
  166. sphere.Material = Enum.Material.Neon
  167. sphere.Color = Color3.fromRGB(0, 255, 0)
  168. sphere.Size = Vector3.new(0.35, 0.35, 0.35)
  169. sphere.Anchored = true
  170. sphere.CanCollide = false
  171. sphere.Parent = Workspace
  172. Markers[part] = sphere
  173. end
  174.  
  175. local function scanForDunks()
  176. table.clear(DunkParts)
  177. for _, v in ipairs(Workspace:GetDescendants()) do
  178. if v:IsA("BasePart") and v.Name == DUNK_NAME and v.Size == DUNK_SIZE then
  179. table.insert(DunkParts, v)
  180. if not Markers[v] then
  181. createMarker(v)
  182. end
  183. end
  184. end
  185. end
  186. scanForDunks()
  187.  
  188. Workspace.DescendantAdded:Connect(function(o)
  189. if o:IsA("BasePart") and o.Name == DUNK_NAME and o.Size == DUNK_SIZE then
  190. table.insert(DunkParts, o)
  191. createMarker(o)
  192. end
  193. end)
  194.  
  195. Workspace.DescendantRemoving:Connect(function(o)
  196. for i, v in ipairs(DunkParts) do
  197. if v == o then
  198. table.remove(DunkParts, i)
  199. break
  200. end
  201. end
  202. if Markers[o] then
  203. Markers[o]:Destroy()
  204. Markers[o] = nil
  205. end
  206. if selectedRim == o then
  207. selectedRim = nil
  208. labelGui.Enabled = false
  209. end
  210. end)
  211.  
  212. -- AUTO LOCK NEAREST dunkDetect
  213. task.spawn(function()
  214. while task.wait(0.1) do
  215. if not getgenv().PAYLOAD0_SYSTEM_ACTIVE then
  216. continue
  217. end
  218. local root = plr.Character and plr.Character:FindFirstChild("HumanoidRootPart")
  219. if not root then continue end
  220.  
  221. local closest, bestDist = nil, 85
  222. for _, part in ipairs(DunkParts) do
  223. if part:IsDescendantOf(Workspace) then
  224. local dist = (part.Position - root.Position).Magnitude
  225. if dist < bestDist then
  226. local _, onScreen = Camera:WorldToViewportPoint(part.Position)
  227. if onScreen then
  228. closest, bestDist = part, dist
  229. end
  230. end
  231. local sphere = Markers[part]
  232. if sphere then
  233. sphere.Position = part.Position + Vector3.new(0, 2.3, 0)
  234. end
  235. end
  236. end
  237.  
  238. if closest and closest ~= selectedRim then
  239. selectedRim = closest
  240. print(("[dunkDetect] Selected: %s (%.1f studs)"):format(closest:GetFullName(), bestDist))
  241. end
  242.  
  243. for part, sphere in pairs(Markers) do
  244. if part == selectedRim then
  245. sphere.Color = Color3.fromRGB(255, 255, 0)
  246. sphere.Size = Vector3.new(0.45, 0.45, 0.45)
  247. labelGui.Enabled = true
  248. labelGui.Adornee = part
  249. else
  250. sphere.Color = Color3.fromRGB(0, 255, 0)
  251. sphere.Size = Vector3.new(0.35, 0.35, 0.35)
  252. end
  253. end
  254. end
  255. end)
  256.  
  257. -- === TOGGLES ===
  258. UserInputService.InputBegan:Connect(function(i, gp)
  259. if gp then return end
  260. if i.KeyCode == Enum.KeyCode.O then
  261. VisualsEnabled = not VisualsEnabled
  262. notify(VisualsEnabled and '👁 Visuals ON' or '🙈 Visuals OFF', VisualsEnabled and COLOR_GREEN or Color3.fromRGB(255, 80, 80))
  263. end
  264. if i.KeyCode == Enum.KeyCode.V then
  265. getgenv().PAYLOAD0_SYSTEM_ACTIVE = not getgenv().PAYLOAD0_SYSTEM_ACTIVE
  266. notify(getgenv().PAYLOAD0_SYSTEM_ACTIVE and '✅ System ON' or '🚫 System OFF', getgenv().PAYLOAD0_SYSTEM_ACTIVE and COLOR_GREEN or Color3.fromRGB(255, 80, 80))
  267. end
  268. end)
  269.  
  270. -- === SHOOT KEY CAPTURE ===
  271. local old
  272. old = hookmetamethod(game, '__namecall', function(self, ...)
  273. local m = getnamecallmethod()
  274. if m == 'FireServer' and self == shootRemote then
  275. local args = { ... }
  276. if type(args[3]) == 'string' and not shootKey then
  277. shootKey = args[3]
  278. removeCalibrateUI()
  279. notify('Shoot key captured!', COLOR_GREEN)
  280. end
  281. end
  282. return old(self, ...)
  283. end)
  284.  
  285. -- === SHOOT LOGIC ===
  286. local lastTick, moveOffset = 0, Vector3.zero
  287. local function computeOffset()
  288. if tick() - lastTick > 0.1 then
  289. local hum = plr.Character and plr.Character:FindFirstChildOfClass('Humanoid')
  290. local moveDir = (hum and hum.MoveDirection) or Vector3.zero
  291. moveOffset = Vector3.new(moveDir.X * 1.5, 0, moveDir.Z * 1.5)
  292. lastTick = tick()
  293. end
  294. return moveOffset
  295. end
  296.  
  297. local function computeArc(dist)
  298. return Vector3.new(0, 43 + (dist / 15), 0)
  299. end
  300.  
  301. local function smartAim(rim)
  302. local offset = computeOffset()
  303. local root = plr.Character and plr.Character:FindFirstChild('HumanoidRootPart')
  304. if not root then
  305. return rim.Position
  306. end
  307. local dist = (root.Position - rim.Position).Magnitude
  308. return rim.Position + computeArc(dist) - offset
  309. end
  310.  
  311. local function shootAtTarget()
  312. if not getgenv().PAYLOAD0_SYSTEM_ACTIVE then return end
  313. if not (selectedRim and selectedRim:IsDescendantOf(Workspace)) then return end
  314. if not shootKey then return end
  315. local char = plr.Character
  316. if not char then return end
  317. local head, root = char:FindFirstChild('Head'), char.PrimaryPart
  318. if not (head and root) then return end
  319. local aimPos = smartAim(selectedRim)
  320. local dir = (aimPos - head.Position).Unit
  321. local shootFrom = root.Position + dir * 3.8
  322. if shootFrom.Y - root.Position.Y < 4 then
  323. shootFrom = root.Position + dir * 4
  324. end
  325. shootRemote:FireServer(aimPos, shootFrom, shootKey)
  326. end
  327.  
  328. UserInputService.InputBegan:Connect(function(i, gp)
  329. if gp or not getgenv().PAYLOAD0_SYSTEM_ACTIVE then return end
  330. if i.UserInputType == Enum.UserInputType.MouseButton1 and hasBall() then
  331. shootAtTarget()
  332. end
  333. end)
  334.  
  335. -- === HIGHLIGHT VISUAL ===
  336. local hl = CoreGui:FindFirstChild('PerfectRangeGlow') or Instance.new('Highlight')
  337. hl.Name = 'PerfectRangeGlow'
  338. hl.DepthMode = Enum.HighlightDepthMode.AlwaysOnTop
  339. hl.FillTransparency = 0.25
  340. hl.OutlineTransparency = 0
  341. hl.Adornee = plr.Character
  342. hl.Parent = CoreGui
  343. hl.Enabled = false
  344.  
  345. local moveKeys = { W = false, A = false, S = false, D = false }
  346. UserInputService.InputBegan:Connect(function(i, gp)
  347. if gp then return end
  348. if moveKeys[i.KeyCode.Name] ~= nil then moveKeys[i.KeyCode.Name] = true end
  349. end)
  350. UserInputService.InputEnded:Connect(function(i, gp)
  351. if gp then return end
  352. if moveKeys[i.KeyCode.Name] ~= nil then moveKeys[i.KeyCode.Name] = false end
  353. end)
  354.  
  355. local function shouldPush()
  356. local count = 0
  357. for _, v in pairs(moveKeys) do
  358. if v then count += 1 end
  359. end
  360. return count == 1 and (moveKeys.A or moveKeys.D)
  361. end
  362.  
  363. -- === PUSH LOGIC ===
  364. local rimsForPush = {}
  365. for _, v in ipairs(Workspace:GetDescendants()) do
  366. if v:IsA('BasePart') and v.Name == 'Lol' and v.Parent and v.Parent.Name == 'Rim' then
  367. table.insert(rimsForPush, v)
  368. end
  369. end
  370.  
  371. local function nearestRim(rootPos)
  372. local nearest, nearestDist
  373. for _, rim in ipairs(rimsForPush) do
  374. if rim:IsDescendantOf(Workspace) then
  375. local rimXZ = Vector3.new(rim.Position.X, 0, rim.Position.Z)
  376. local dist = (rimXZ - Vector3.new(rootPos.X, 0, rootPos.Z)).Magnitude
  377. if not nearestDist or dist < nearestDist then
  378. nearest, nearestDist = rim, dist
  379. end
  380. end
  381. end
  382. return nearest, nearestDist
  383. end
  384.  
  385. local function getNearestPerfectDistance(current)
  386. local nearest, smallestDiff
  387. for _, pd in ipairs(PERFECT_DISTANCES) do
  388. local diff = math.abs(pd - current)
  389. if not smallestDiff or diff < smallestDiff then
  390. nearest, smallestDiff = pd, diff
  391. end
  392. end
  393. return nearest
  394. end
  395.  
  396. -- === RUNTIME LOOP ===
  397. local smoothBias = Vector3.zero
  398. RunService.RenderStepped:Connect(function()
  399. if not getgenv().PAYLOAD0_SYSTEM_ACTIVE then
  400. hl.Enabled = false
  401. return
  402. end
  403. local char = plr.Character
  404. local hum = char and char:FindFirstChildOfClass('Humanoid')
  405. local root = char and char:FindFirstChild('HumanoidRootPart')
  406. if not (hum and root) then return end
  407. if not hasBall() then
  408. hl.Enabled = false
  409. return
  410. end
  411. local rim, dist = nearestRim(root.Position)
  412. if not rim or dist > ACTIVE_RANGE_MAIN then
  413. hl.Enabled = false
  414. smoothBias = Vector3.zero
  415. return
  416. end
  417. local target = getNearestPerfectDistance(dist)
  418. local diff = dist - target
  419. local absDiff = math.abs(diff)
  420. local desired = Vector3.zero
  421. if shouldPush() and absDiff < CLAMP_RADIUS then
  422. local strength = (CLAMP_RADIUS - absDiff) / CLAMP_RADIUS
  423. local toRim = Vector3.new(rim.Position.X, 0, rim.Position.Z) - Vector3.new(root.Position.X, 0, root.Position.Z)
  424. local distSign = math.sign(diff)
  425. if distSign > 0 then
  426. local pushDir = -toRim.Unit
  427. desired = pushDir * math.min(strength * MAX_PUSH, MAX_PUSH)
  428. end
  429. end
  430. smoothBias = smoothBias * DAMPING + desired * (1 - DAMPING)
  431. root.CFrame += Vector3.new(smoothBias.X, 0, smoothBias.Z)
  432. if VisualsEnabled then
  433. hl.Enabled = true
  434. if absDiff <= 0.10 then
  435. hl.FillColor, hl.OutlineColor = COLOR_GREEN, COLOR_GREEN
  436. elseif absDiff < CLAMP_RADIUS then
  437. hl.FillColor, hl.OutlineColor = COLOR_GREEN_SOFT, COLOR_GREEN_SOFT
  438. else
  439. hl.Enabled = false
  440. end
  441. else
  442. hl.Enabled = false
  443. end
  444. end)
  445.  
  446. plr.CharacterAdded:Connect(function(c)
  447. task.wait(0.5)
  448. hl.Adornee = c
  449. end)
  450.  
Advertisement
Add Comment
Please, Sign In to add comment