FE CD script
Key Required

FE CD script

Natural Disaster SurvivalCarlos123123Carlos123123 7K views 106 executesUpdated Jan 22, 2025
Unrated
00
Lua Script•107 lines (4005 chars)
-- 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)

Features & Information

this is a stool that when activated, it makes the parts around you spin like a CD, USE THE SCRIPT BEFORE YAPPING ABOUT YOUR YAPPING YAPPITY YAP, and this is my first script, please accept the issues, the script will not working on these maps(I guess): the racing map

Community Comments (5)

conartconartJan 22, 2025(edited)

i dont understand

conartconartJan 22, 2025(edited)

what do u mean by cd

Carlos123123Carlos123123Jan 22, 2025(edited)

It means spin the parts like CD

ast4576ast4576Jan 22, 2025(edited)

rats ur computer

sigmarizzlerofgaysigmarizzlerofgayJun 29, 2025

How to use this

More Scripts for Natural Disaster Survival