
Key Required

-- Create the Tool
local tool = Instance.new("Tool")
tool.Name = "CD spinner tool"
tool.RequiresHandle = false
tool.Parent = game.Players.LocalPlayer:WaitForChild("Backpack")
-- Variables
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
local holding = false
local grabRange = 250 -- Range for grabbing parts around the player
local maxPartsToGrab = 7500 -- Limit the number of parts grabbed to prevent overload
local grabbedParts = {}
local updateInterval = 7 -- Reduced update frequency to reduce load
-- Function to grab all parts around the player
local function grabAllPartsAroundPlayer()
if holding then return end
holding = true
local character = player.Character or player.CharacterAdded:Wait()
local root = character:FindFirstChild("HumanoidRootPart")
if not root then return end
local parts = workspace:GetPartBoundsInRadius(root.Position, grabRange)
local count = 0
-- Loop through the parts to grab and manipulate them
for _, part in ipairs(parts) do
if part:IsA("BasePart") and not part.Anchored and not part:IsDescendantOf(character) then
-- Skip parts that are too small or welded
if count >= maxPartsToGrab then break end
-- Add a BodyPosition to control the part's position
local bodyPosition = Instance.new("BodyPosition")
bodyPosition.MaxForce = Vector3.new(1e6, 1e6, 1e6)
bodyPosition.P = 1000 -- Lower P value for smoother movement
bodyPosition.D = 500 -- Higher damping for stability
bodyPosition.Position = root.Position + Vector3.new(0, 34, 0) -- Position the parts above the player
bodyPosition.Parent = part
-- Add a BodyAngularVelocity to spin the parts for effect
local bodyAngularVelocity = Instance.new("BodyAngularVelocity")
bodyAngularVelocity.MaxTorque = Vector3.new(1e6, 1e6, 1e6) -- High torque for fast spinning
bodyAngularVelocity.AngularVelocity = Vector3.new(200, 200, 200) -- Adjust spin speed
bodyAngularVelocity.Parent = part
-- Disable collisions and make the part massless
part.CanCollide = false
part.Massless = true
-- Store the part and its BodyPosition for later reference
table.insert(grabbedParts, { part = part, bodyPosition = bodyPosition, bodyAngularVelocity = bodyAngularVelocity })
count = count + 1
end
end
-- Update positions of grabbed parts less frequently to save performance
local runService = game:GetService("RunService")
local connection
connection = runService.Heartbeat:Connect(function()
if not holding then
connection:Disconnect()
return
end
-- Move the grabbed parts smoothly to the player position
local targetPosition = root.Position + Vector3.new(0, 5, 0) -- Place parts above the player
for _, grabbed in ipairs(grabbedParts) do
if grabbed.bodyPosition and grabbed.part then
grabbed.bodyPosition.Position = targetPosition
end
end
end)
end
-- Function to cleanup grabbed parts
local function cleanup()
for _, grabbed in ipairs(grabbedParts) do
if grabbed.part then
grabbed.part.CanCollide = true
grabbed.part.Massless = false
if grabbed.bodyPosition then
grabbed.bodyPosition:Destroy()
end
if grabbed.bodyAngularVelocity then
grabbed.bodyAngularVelocity:Destroy() -- Remove spin when cleanup
end
end
end
grabbedParts = {}
holding = false
end
-- Cleanup on death/reset
player.CharacterAdded:Connect(function()
cleanup()
end)
-- Tool activation logic
tool.Activated:Connect(function()
if not holding then
grabAllPartsAroundPlayer()
else
cleanup() -- Clean up if tool is activated again
end
end)
i dont understand
what do u mean by cd
It means spin the parts like CD
rats ur computer
How to use this