-- Versión Mejorada del Shift Lock Lite local Players = game:GetService("Players") local RunService = game:GetService("RunService") local UserInputService = game:GetService("UserInputService") local TweenService = game:GetService("TweenService") local player = Players.LocalPlayer local character = player.Character or player.CharacterAdded:Wait() local humanoid = character:WaitForChild("Humanoid") local rootPart = character:WaitForChild("HumanoidRootPart") local camera = workspace.CurrentCamera -- CONFIGURACIONES AJUSTABLES local SHIFT_KEY = Enum.KeyCode.LeftShift -- Tecla para activar local OFFSET_X = 1.75 -- Distancia horizontal de la cámara local OFFSET_Y = 0 -- Distancia vertical local OFFSET_Z = 0.5 -- Alejamiento de la cámara local SMOOTHNESS = 0.25 -- Velocidad de suavizado (mientras más bajo, más rápido rota) local shiftLocked = false local connection -- Sonido opcional (descomentar y poner ID si se quiere) -- local toggleSound = Instance.new("Sound") -- toggleSound.SoundId = "rbxassetid://TU_ID_DE_SONIDO" -- toggleSound.Parent = character local function toggleShiftLock(active) shiftLocked = active if active then -- Desactivar rotación automática del humanoide para controlarlo manualmente humanoid.AutoRotate = false -- Ocultar el cursor normal si lo deseas (opcional) -- UserInputService.MouseIconEnabled = false -- Iniciar el ciclo de rotación y centrado connection = RunService.RenderStepped:Connect(function(deltaTime) -- Bloquear ratón en el centro UserInputService.MouseBehavior = Enum.MouseBehavior.LockCenter -- Mover la cámara ligeramente hacia el hombro local targetOffset = Vector3.new(OFFSET_X, OFFSET_Y, OFFSET_Z) humanoid.CameraOffset = humanoid.CameraOffset:Lerp(targetOffset, SMOOTHNESS) -- Hacer que el personaje mire hacia donde apunta la cámara local _, yRot = camera.CFrame:ToEulerAnglesYXZ() rootPart.CFrame = rootPart.CFrame:Lerp(CFrame.new(rootPart.Position) * CFrame.Angles(0, yRot, 0), SMOOTHNESS) end) else -- Restaurar estado original if connection then connection:Disconnect() end -- Limpiar comportamientos y offsets de cámara UserInputService.MouseBehavior = Enum.MouseBehavior.Default humanoid.AutoRotate = true local tweenInfo = TweenInfo.new(0.3, Enum.EasingStyle.Quad, Enum.EasingDirection.Out) local tween = TweenService:Create(humanoid, tweenInfo, {CameraOffset = Vector3.new(0, 0, 0)}) tween:Play() end end -- Detección de la tecla UserInputService.InputBegan:Connect(function(input, isProcessed) if isProcessed then return end if input.KeyCode == SHIFT_KEY then toggleShiftLock(not shiftLocked) -- if toggleSound then toggleSound:Play() end end end) -- Asegurar que el script siga funcionando al reaparecer o morir player.CharacterAdded:Connect(function(newChar) character = newChar humanoid = character:WaitForChild("Humanoid") rootPart = character:WaitForChild("HumanoidRootPart") if shiftLocked then toggleShiftLock(false) toggleShiftLock(true) end end)