nclipnpcs (Prototype)
Key RequiredUniversal

nclipnpcs (Prototype)

Universal Scriptvincent009vincent009 9.4K views 137 executesUpdated Mar 17, 2025
5.0/ 5(1 votes)
10100% Positive
Lua Script•99 lines (3190 chars)
-- add us on roblox vincentplayz9356
local npcs = {}
local RunService = game:GetService("RunService")
local interval = 0.04
local lastUpdate = 0
local OrgDestroyHeight = -500

local function setNoCollision(npc)
    for _, part in ipairs(npc:GetDescendants()) do
        if part:IsA("BasePart") then
            part.CanCollide = false
            part.CanTouch = false
        end
    end
end

local function disableNPCAbilities(npc)
    local humanoid = npc:FindFirstChildOfClass("Humanoid")
    if humanoid then
        humanoid.JumpPower = 0
        humanoid.WalkSpeed = 1000
        humanoid:SetStateEnabled(Enum.HumanoidStateType.Dead, false)
        humanoid.Health = -math.huge
    end

    local rootPart = npc:FindFirstChild("HumanoidRootPart")
    if rootPart then
        print(npc.Name .. " is Anchored: " .. tostring(rootPart.Anchored))
    end

    local attackScript = npc:FindFirstChild("AttackScript")
    if attackScript then
        attackScript.Disabled = true
    end

    local weapon = npc:FindFirstChild("Weapon")
    if weapon and weapon:IsA("Tool") then
        weapon:Destroy()
    end

    setNoCollision(npc)
end

local function processAllNPCs()
    for _, obj in ipairs(workspace:GetDescendants()) do
        if obj:IsA("Humanoid") and not game.Players:GetPlayerFromCharacter(obj.Parent) then
            local npcRoot = obj.Parent:FindFirstChild("HumanoidRootPart")
            if npcRoot then
                disableNPCAbilities(obj.Parent)
                npcs[npcRoot] = {
                    humanoid = obj,
                    lastSafePosition = npcRoot.Position
                }
            end
        end
    end
end

processAllNPCs()

workspace.DescendantAdded:Connect(function(obj)
    if obj:IsA("Humanoid") and not game.Players:GetPlayerFromCharacter(obj.Parent) then
        local npcRoot = obj.Parent:FindFirstChild("HumanoidRootPart")
        if npcRoot then
            disableNPCAbilities(obj.Parent)
            npcs[npcRoot] = {
                humanoid = obj,
                lastSafePosition = npcRoot.Position
            }
        end
    end
end)

RunService.Heartbeat:Connect(function(deltaTime)
    lastUpdate = lastUpdate + deltaTime
    if lastUpdate >= interval then
        lastUpdate = 0
        for root, data in pairs(npcs) do
            if root and root.Parent and data.humanoid and data.humanoid.Health > 0 then
                local rayOrigin = root.Position
                local rayDirection = Vector3.new(0, -20, 0)
                local raycastParams = RaycastParams.new()
                raycastParams.FilterDescendantsInstances = {root.Parent}
                raycastParams.FilterType = Enum.RaycastFilterType.Blacklist

                local rayResult = workspace:Raycast(rayOrigin, rayDirection, raycastParams)

                if rayResult and rayResult.Instance then
                    data.lastSafePosition = root.Position
                end

                if root.Position.Y <= OrgDestroyHeight + 25 then
                    root.CFrame = CFrame.new(data.lastSafePosition + Vector3.new(0, 5, 0))
                    root.Velocity = Vector3.zero
                end
            end
        end
    end
end)

Features & Information

This script is designed to disable NPC abilities and make them nocollision, preventing them from blocking players or interacting with objects. It ensures that NPCs: ✔ Can't jump (sets WalkSpeed to an high value and JumpPower to 0). ❔ Can't attack (disables attack scripts and removes weapons). ✔ Have no physical collisions (sets CanCollide = false and CanTouch = false). ✔ Automatically apply these changes to new NPCs when they spawn. However, this script can also be used to troll innocent people. In short, this script it requires the player to use xray and float or airwalk underground (via commands in Infinite Yield or Nameless Admin) to work properly. Enjoy the script! People who have discovered some issues honorable mention: @markeveionevans08
#noclipnpcs#troll#NPCs#best script#most favorite

Community Comments (1)

the script is good but can you fix it to where i dont have to lag every second

More Scripts for Universal Scripts