Better Invisibility
Key RequiredUniversal

Better Invisibility

Universal ScriptISOXTERIAISOXTERIA 516 views 4K executesUpdated Sep 23, 2026
Unrated
00
Lua Script•285 lines (8325 chars)
-- Services
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local UserInputService = game:GetService("UserInputService")
local Workspace = game:GetService("Workspace")

local LocalPlayer = Players.LocalPlayer
local Character = LocalPlayer.Character or LocalPlayer.CharacterAdded:Wait()
local RealHumanoid = Character:WaitForChild("Humanoid")
local RealRoot = Character:WaitForChild("HumanoidRootPart")

-- Settings & State
local BOOSTED_SPEED = 28
local NORMAL_SPEED = 16

local isDesynced = false
local isNoclip = false

local fakeCharacter = nil
local fakeHumanoid = nil
local fakeRoot = nil
local noclipConnection = nil
local inputConnection = nil

-- UI Setup (PC & Mobile Compatible)
local ScreenGui = Instance.new("ScreenGui")
ScreenGui.Name = "InvisToggleGui"
ScreenGui.ResetOnSpawn = false
ScreenGui.Parent = LocalPlayer:WaitForChild("PlayerGui")

local Frame = Instance.new("Frame")
Frame.Name = "Container"
Frame.Size = UDim2.new(0, 120, 0, 90)
Frame.Position = UDim2.new(0.85, -60, 0.2, 0)
Frame.BackgroundTransparency = 1
Frame.Parent = ScreenGui

local ToggleButton = Instance.new("TextButton")
ToggleButton.Name = "ToggleButton"
ToggleButton.Size = UDim2.new(1, 0, 0, 40)
ToggleButton.Position = UDim2.new(0, 0, 0, 0)
ToggleButton.BackgroundColor3 = Color3.fromRGB(30, 30, 35)
ToggleButton.BorderColor3 = Color3.fromRGB(0, 200, 255)
ToggleButton.BorderSizePixel = 2
ToggleButton.Text = "INVIS: OFF"
ToggleButton.TextColor3 = Color3.fromRGB(255, 255, 255)
ToggleButton.TextSize = 13
ToggleButton.Font = Enum.Font.SourceSansBold
ToggleButton.Parent = Frame

local InvisCorner = Instance.new("UICorner")
InvisCorner.CornerRadius = UDim.new(0, 8)
InvisCorner.Parent = ToggleButton

local NoclipButton = Instance.new("TextButton")
NoclipButton.Name = "NoclipButton"
NoclipButton.Size = UDim2.new(1, 0, 0, 40)
NoclipButton.Position = UDim2.new(0, 0, 0, 46)
NoclipButton.BackgroundColor3 = Color3.fromRGB(30, 30, 35)
NoclipButton.BorderColor3 = Color3.fromRGB(150, 150, 150)
NoclipButton.BorderSizePixel = 2
NoclipButton.Text = "NOCLIP: OFF"
NoclipButton.TextColor3 = Color3.fromRGB(200, 200, 200)
NoclipButton.TextSize = 13
NoclipButton.Font = Enum.Font.SourceSansBold
NoclipButton.Parent = Frame

local NoclipCorner = Instance.new("UICorner")
NoclipCorner.CornerRadius = UDim.new(0, 8)
NoclipCorner.Parent = NoclipButton

-- Mobile & PC Draggable UI
local dragging, dragInput, dragStart, startPos
local function updateUI(input)
	local delta = input.Position - dragStart
	Frame.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
end

local function bindDrag(button)
	button.InputBegan:Connect(function(input)
		if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
			dragging = true
			dragStart = input.Position
			startPos = Frame.Position
			input.Changed:Connect(function()
				if input.UserInputState == Enum.UserInputState.End then
					dragging = false
				end
			end)
		end
	end)

	button.InputChanged:Connect(function(input)
		if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then
			dragInput = input
		end
	end)
end

bindDrag(ToggleButton)
bindDrag(NoclipButton)

UserInputService.InputChanged:Connect(function(input)
	if input == dragInput and dragging then
		updateUI(input)
	end
end)

-- Enable Noclip Handling
local function setNoclipState(state)
	isNoclip = state
	if isNoclip then
		NoclipButton.Text = "NOCLIP: ON"
		NoclipButton.TextColor3 = Color3.fromRGB(255, 170, 0)
		NoclipButton.BorderColor3 = Color3.fromRGB(255, 170, 0)
		
		if not noclipConnection then
			noclipConnection = RunService.Stepped:Connect(function()
				if isNoclip and fakeCharacter then
					for _, part in ipairs(fakeCharacter:GetDescendants()) do
						if part:IsA("BasePart") then
							part.CanCollide = false
						end
					end
				end
			end)
		end
	else
		NoclipButton.Text = "NOCLIP: OFF"
		NoclipButton.TextColor3 = Color3.fromRGB(200, 200, 200)
		NoclipButton.BorderColor3 = Color3.fromRGB(150, 150, 150)
		
		if noclipConnection then
			noclipConnection:Disconnect()
			noclipConnection = nil
		end
		
		if fakeCharacter then
			for _, part in ipairs(fakeCharacter:GetDescendants()) do
				if part:IsA("BasePart") then
					part.CanCollide = true
				end
			end
		end
	end
end

-- Enable Invisibility (Local Body + Speed Boost + Floating Sky Body)
local function enableInvis()
	if isDesynced or not Character or not RealRoot or not RealHumanoid then return end
	isDesynced = true

	ToggleButton.Text = "INVIS: ON"
	ToggleButton.TextColor3 = Color3.fromRGB(0, 255, 120)
	ToggleButton.BorderColor3 = Color3.fromRGB(0, 255, 120)

	local startCFrame = RealRoot.CFrame
	local skyCFrame = startCFrame * CFrame.new(0, 500, 0)

	-- 1. Create Local Body
	Character.Archivable = true
	fakeCharacter = Character:Clone()
	Character.Archivable = false

	fakeCharacter.Name = "LocalInvisBody"
	fakeHumanoid = fakeCharacter:WaitForChild("Humanoid")
	fakeRoot = fakeCharacter:WaitForChild("HumanoidRootPart")

	-- Apply Speed Boost
	fakeHumanoid.WalkSpeed = BOOSTED_SPEED

	for _, part in ipairs(fakeCharacter:GetDescendants()) do
		if part:IsA("BasePart") then
			part.Transparency = 0.5
			part.CanCollide = not isNoclip
			part.CustomPhysicalProperties = PhysicalProperties.new(0.7, 0.3, 0.5)
		end
	end

	fakeCharacter.Parent = Workspace
	fakeRoot.CFrame = startCFrame

	-- Prevent collision between real body and fake body
	for _, realPart in ipairs(Character:GetDescendants()) do
		if realPart:IsA("BasePart") then
			for _, fakePart in ipairs(fakeCharacter:GetDescendants()) do
				if fakePart:IsA("BasePart") then
					local noCollide = Instance.new("NoCollisionConstraint")
					noCollide.Part0 = realPart
					noCollide.Part1 = fakePart
					noCollide.Parent = fakeCharacter
				end
			end
		end
	end

	-- Redirect Camera
	Workspace.CurrentCamera.CameraSubject = fakeHumanoid

	-- Movement Bind Loop
	inputConnection = RunService.RenderStepped:Connect(function()
		if isDesynced and fakeHumanoid and RealHumanoid then
			fakeHumanoid:Move(RealHumanoid.MoveDirection, false)
			fakeHumanoid.Jump = RealHumanoid.Jump
		end
	end)

	-- Anchor real server body in mid-air
	RealRoot.Anchored = true
	RealRoot.CFrame = skyCFrame
end

-- Disable Invisibility
local function disableInvis()
	if not isDesynced or not Character or not RealRoot then return end
	isDesynced = false

	ToggleButton.Text = "INVIS: OFF"
	ToggleButton.TextColor3 = Color3.fromRGB(255, 255, 255)
	ToggleButton.BorderColor3 = Color3.fromRGB(0, 200, 255)

	-- Disable Noclip Loop
	setNoclipState(false)

	if inputConnection then inputConnection:Disconnect() inputConnection = nil end

	RealRoot.Anchored = false

	if fakeRoot then
		local finalCFrame = fakeRoot.CFrame
		fakeCharacter:Destroy()
		fakeCharacter = nil
		fakeHumanoid = nil
		fakeRoot = nil

		RealRoot.CFrame = finalCFrame
		RealRoot.AssemblyLinearVelocity = Vector3.zero
		RealRoot.AssemblyAngularVelocity = Vector3.zero
	end

	-- Reset Real Speed & Camera
	RealHumanoid.WalkSpeed = NORMAL_SPEED
	Workspace.CurrentCamera.CameraSubject = RealHumanoid
end

local function toggleInvis()
	if isDesynced then
		disableInvis()
	else
		enableInvis()
	end
end

-- UI Controls
ToggleButton.MouseButton1Click:Connect(toggleInvis)

NoclipButton.MouseButton1Click:Connect(function()
	if isDesynced then
		setNoclipState(not isNoclip)
	end
end)

-- PC Keybind Shortcuts (] for Invis, C for Noclip)
UserInputService.InputBegan:Connect(function(input, gameProcessed)
	if gameProcessed then return end
	if input.KeyCode == Enum.KeyCode.RightBracket then
		toggleInvis()
	elseif input.KeyCode == Enum.KeyCode.C and isDesynced then
		setNoclipState(not isNoclip)
	end
end)

-- Respawn Handler
LocalPlayer.CharacterAdded:Connect(function(newChar)
	Character = newChar
	RealHumanoid = Character:WaitForChild("Humanoid")
	RealRoot = Character:WaitForChild("HumanoidRootPart")
	isDesynced = false
	setNoclipState(false)
	if inputConnection then inputConnection:Disconnect() end
	if fakeCharacter then fakeCharacter:Destroy() end
	ToggleButton.Text = "INVIS: OFF"
	ToggleButton.TextColor3 = Color3.fromRGB(255, 255, 255)
	ToggleButton.BorderColor3 = Color3.fromRGB(0, 200, 255)
end)

Features & Information

Invisibility better than invisibility that are already here

Community Comments (0)

No comments yet for this script.

More Scripts for Universal Scripts