ColdSpecs

LBU Rim (Dot)

Nov 2nd, 2025 (edited)
33
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.87 KB | None | 0 0
  1. local Players = game:GetService("Players")
  2. local Workspace = game:GetService("Workspace")
  3. local RunService = game:GetService("RunService")
  4.  
  5. local plr = Players.LocalPlayer
  6.  
  7. -- === CONFIG ===
  8. local TARGET_NAME = "Rim"
  9. local TARGET_SIZE = Vector3.new(3.632131576538086, 0.35878971219062805, 3.632131576538086)
  10. local SEARCH_RADIUS = 120
  11.  
  12. local Targets = {}
  13. local Markers = {}
  14. local selectedTarget
  15.  
  16. -- === VISUAL MARKER ===
  17. local function makeMarker(part)
  18. local marker = Instance.new("Part")
  19. marker.Shape = Enum.PartType.Ball
  20. marker.Size = Vector3.new(0.35, 0.35, 0.35)
  21. marker.Material = Enum.Material.Neon
  22. marker.Color = Color3.fromRGB(0, 255, 0)
  23. marker.Anchored = true
  24. marker.CanCollide = false
  25. marker.Parent = Workspace
  26. Markers[part] = marker
  27. end
  28.  
  29. local function updateMarker(part)
  30. local marker = Markers[part]
  31. if marker and part:IsDescendantOf(Workspace) then
  32. marker.Position = part.Position + Vector3.new(0, 2.5, 0)
  33. end
  34. end
  35.  
  36. local function removeMarker(part)
  37. local marker = Markers[part]
  38. if marker then
  39. marker:Destroy()
  40. Markers[part] = nil
  41. end
  42. end
  43.  
  44. -- === SCANNER ===
  45. local function findAllTargets()
  46. table.clear(Targets)
  47. for _, v in ipairs(Workspace:GetDescendants()) do
  48. if v:IsA("BasePart") and v.Name == TARGET_NAME and v.Size == TARGET_SIZE then
  49. table.insert(Targets, v)
  50. if not Markers[v] then
  51. makeMarker(v)
  52. end
  53. end
  54. end
  55. end
  56.  
  57. -- === INITIALIZE ===
  58. findAllTargets()
  59.  
  60. -- === AUTO-UPDATES ===
  61. Workspace.DescendantAdded:Connect(function(o)
  62. if o:IsA("BasePart") and o.Name == TARGET_NAME and o.Size == TARGET_SIZE then
  63. table.insert(Targets, o)
  64. makeMarker(o)
  65. end
  66. end)
  67.  
  68. Workspace.DescendantRemoving:Connect(function(o)
  69. for i, part in ipairs(Targets) do
  70. if part == o then
  71. table.remove(Targets, i)
  72. break
  73. end
  74. end
  75. removeMarker(o)
  76. if selectedTarget == o then
  77. selectedTarget = nil
  78. end
  79. end)
  80.  
  81. -- === TRACKING LOOP ===
  82. task.spawn(function()
  83. while task.wait(0.1) do
  84. local root = plr.Character and plr.Character:FindFirstChild("HumanoidRootPart")
  85. if not root then continue end
  86.  
  87. local best, bestDist = nil, SEARCH_RADIUS
  88. for _, part in ipairs(Targets) do
  89. if part:IsDescendantOf(Workspace) then
  90. local dist = (part.Position - root.Position).Magnitude
  91. if dist < bestDist then
  92. best, bestDist = part, dist
  93. end
  94. end
  95. updateMarker(part)
  96. end
  97.  
  98. if best and best ~= selectedTarget then
  99. selectedTarget = best
  100. print("[dunkDetect] Selected:", best:GetFullName(), string.format("(%.1f studs away)", bestDist))
  101. end
  102.  
  103. -- Visual cue for selected target
  104. for part, marker in pairs(Markers) do
  105. if part == selectedTarget then
  106. marker.Color = Color3.fromRGB(255, 255, 0)
  107. marker.Size = Vector3.new(0.45, 0.45, 0.45)
  108. else
  109. marker.Color = Color3.fromRGB(0, 255, 0)
  110. marker.Size = Vector3.new(0.35, 0.35, 0.35)
  111. end
  112. end
  113. end
  114. end)
  115.  
Advertisement
Add Comment
Please, Sign In to add comment