local Players = game:GetService("Players") local TweenService = game:GetService("TweenService") local RunService = game:GetService("RunService") local player = Players.LocalPlayer local camera = workspace.CurrentCamera local character = player.Character or player.CharacterAdded:Wait() local humanoidRoot = character:WaitForChild("HumanoidRootPart") local humanoid = character:WaitForChild("Humanoid") local invisToggle = false local fakePart = nil local forwardPressed = false local upPressed = false local downPressed = false local renderBound = false local function createUI() local gui = Instance.new("ScreenGui") gui.Name = "InvisibleToggleUI" gui.ResetOnSpawn = false gui.Parent = player:WaitForChild("PlayerGui") local ToggleButton = Instance.new("TextButton") ToggleButton.Size = UDim2.new(0,120,0,40) ToggleButton.Position = UDim2.new(1,-130,0,10) ToggleButton.BackgroundColor3 = Color3.fromRGB(50,50,50) ToggleButton.TextColor3 = Color3.fromRGB(255,255,255) ToggleButton.Text = "hi tap button for on" ToggleButton.Parent = gui local ForwardButton = Instance.new("TextButton") ForwardButton.Size = UDim2.new(0,100,0,40) ForwardButton.Position = UDim2.new(0.5,-50,1,-60) ForwardButton.BackgroundColor3 = Color3.fromRGB(70,70,70) ForwardButton.TextColor3 = Color3.fromRGB(255,255,255) ForwardButton.Text = "Forward" ForwardButton.Visible = false ForwardButton.Parent = gui local UpButton = Instance.new("TextButton") UpButton.Size = UDim2.new(0,100,0,40) UpButton.Position = UDim2.new(0.5,-155,1,-60) UpButton.BackgroundColor3 = Color3.fromRGB(70,70,70) UpButton.TextColor3 = Color3.fromRGB(255,255,255) UpButton.Text = "Up" UpButton.Visible = false UpButton.Parent = gui local DownButton = Instance.new("TextButton") DownButton.Size = UDim2.new(0,100,0,40) DownButton.Position = UDim2.new(0.5,55,1,-60) DownButton.BackgroundColor3 = Color3.fromRGB(70,70,70) DownButton.TextColor3 = Color3.fromRGB(255,255,255) DownButton.Text = "Down" DownButton.Visible = false DownButton.Parent = gui ForwardButton.MouseButton1Down:Connect(function() forwardPressed = true end) ForwardButton.MouseButton1Up:Connect(function() forwardPressed = false end) UpButton.MouseButton1Down:Connect(function() upPressed = true end) UpButton.MouseButton1Up:Connect(function() upPressed = false end) DownButton.MouseButton1Down:Connect(function() downPressed = true end) DownButton.MouseButton1Up:Connect(function() downPressed = false end) local function startInvisibleMode() invisToggle = true local targetCFrame = humanoidRoot.CFrame - Vector3.new(0,97,0) local tweenInfo = TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out) local tween = TweenService:Create(humanoidRoot, tweenInfo, {CFrame = targetCFrame}) tween:Play() tween.Completed:Wait() humanoidRoot.Anchored = true fakePart = Instance.new("Part") fakePart.Size = Vector3.new(3,3,3) fakePart.Anchored = true fakePart.CanCollide = false fakePart.Color = Color3.fromRGB(255,0,0) fakePart.Transparency = 0 fakePart.CFrame = humanoidRoot.CFrame + Vector3.new(0,97,0) fakePart.Parent = workspace camera.CameraSubject = fakePart camera.CFrame = fakePart.CFrame ForwardButton.Visible = true UpButton.Visible = true DownButton.Visible = true if not renderBound then renderBound = true RunService:BindToRenderStep("FakePartMove", 301, function(deltaTime) if invisToggle and fakePart then local move = Vector3.new(0,0,0) if forwardPressed then local forward = Vector3.new(camera.CFrame.LookVector.X,0,camera.CFrame.LookVector.Z).Unit move += forward * 17 * 1.65 * deltaTime end if upPressed then move += Vector3.new(0,17 * deltaTime,0) end if downPressed then move -= Vector3.new(0,17 * deltaTime,0) end fakePart.CFrame = fakePart.CFrame + move end end) end end local function stopInvisibleMode() invisToggle = false if renderBound then RunService:UnbindFromRenderStep("FakePartMove") renderBound = false end if fakePart then local distance = (humanoidRoot.Position - fakePart.Position).Magnitude local speed = 2000000 local tweenTime = distance / speed local tween = TweenService:Create(humanoidRoot, TweenInfo.new(tweenTime, Enum.EasingStyle.Linear), {CFrame = fakePart.CFrame}) tween:Play() tween.Completed:Wait() fakePart:Destroy() fakePart = nil end humanoidRoot.Anchored = false camera.CameraSubject = humanoid ForwardButton.Visible = false UpButton.Visible = false DownButton.Visible = false forwardPressed = false upPressed = false downPressed = false end ToggleButton.MouseButton1Click:Connect(function() if invisToggle then stopInvisibleMode() ToggleButton.Text = "invis off" ToggleButton.BackgroundColor3 = Color3.fromRGB(50,50,50) else startInvisibleMode() ToggleButton.Text = "invis on" ToggleButton.BackgroundColor3 = Color3.fromRGB(70,140,70) end end) return gui end local ScreenGui = createUI() player.CharacterAdded:Connect(function(char) character = char humanoidRoot = character:WaitForChild("HumanoidRootPart") humanoid = character:WaitForChild("Humanoid") if not ScreenGui.Parent then ScreenGui.Parent = player:WaitForChild("PlayerGui") end if invisToggle then task.wait(0.3) end end)