trexinator no collision
Key RequiredUniversal

trexinator no collision

Universal Scriptrolledrick581rolledrick581 10.1K views 1.1K executesUpdated Aug 15, 2025
5.0/ 5(1 votes)
10100% Positive
Lua Script•54 lines (1617 chars)
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local LocalPlayer = Players.LocalPlayer
 
local CHECK_INTERVAL = 0.1
local DIST_THRESHOLD = 20
local stopped = false
local connection
 
local function getHRP(character)
    return character and character:FindFirstChild("HumanoidRootPart")
end
 
local function startScript()
    if connection then connection:Disconnect() end
    stopped = false
 
    local character = LocalPlayer.Character or LocalPlayer.CharacterAdded:Wait()
    localHRP = getHRP(character)
 
    connection = RunService.Heartbeat:Connect(function(dt)
        if stopped or not localHRP then return end
 
        localPos = localHRP.Position
        for _, player in ipairs(Players:GetPlayers()) do
            if player ~= LocalPlayer and player.Character then
                local otherHRP = getHRP(player.Character)
                if otherHRP then
                    local dist = (otherHRP.Position - localPos).Magnitude
                    local shouldCollide = dist >= DIST_THRESHOLD
                    for _, part in ipairs(player.Character:GetDescendants()) do
                        if part:IsA("BasePart") and part.CanCollide ~= shouldCollide then
                            part.CanCollide = shouldCollide
                        end
                    end
                end
            end
        end
    end)
end
 
LocalPlayer.Chatted:Connect(function(msg)
    if msg:lower() == "/e nc" then
        stopped = true
    end
end)
 
startScript()
 
 
LocalPlayer.CharacterAdded:Connect(function()
    task.wait(1)
    startScript()
end)

Features & Information

* works for tsb/lbg * never gets ragdolled while it's toggled on

Community Comments (2)

AzScripterAzScripterDec 1, 2025(edited)

If a player dies and comes back to life, does the script still work or does it have to be re-executed?

Replying to @AzScripter
AzScripterAzScripterDec 1, 2025

after I looked at the script it seems to still work if it's alive again

More Scripts for Universal Scripts