local Config = { ms = 0.08, ttl = 0.005, -- i forgot what does it do :< MinHeight = 3, -- height in studs that auto perfect land can work } local RunService = game:GetService("RunService") local VirtualInputManager = game:GetService("VirtualInputManager") local LocalPlayer = game:GetService("Players").LocalPlayer repeat task.wait() until LocalPlayer.Backpack and LocalPlayer.Backpack:FindFirstChild("Main") local env = getsenv(LocalPlayer.Backpack.Main) if not env then return end local falling = false local shiftPressed = false local fallY = 0 local conn = nil local releaseTask = nil local function pressShift() if shiftPressed then return end pcall(function() VirtualInputManager:SendKeyEvent(true, Enum.KeyCode.LeftShift, false, game) shiftPressed = true end) end local function releaseShift() if releaseTask then pcall(function() task.cancel(releaseTask) end) releaseTask = nil end if shiftPressed then pcall(function() VirtualInputManager:SendKeyEvent(false, Enum.KeyCode.LeftShift, false, game) shiftPressed = false end) end end local function cleanup() if conn then pcall(conn.Disconnect, conn) conn = nil end if releaseTask then pcall(function() task.cancel(releaseTask) end) releaseTask = nil end releaseShift() falling = false fallY = 0 end local function setup(Char) cleanup() local Humanoid = Char:FindFirstChild("Humanoid") local Root = Char:FindFirstChild("HumanoidRootPart") if not Humanoid or not Root then return end Humanoid.BreakJointsOnDeath = false conn = RunService.Heartbeat:Connect(function() if not Char.Parent then cleanup() return end if Humanoid.Health <= 0 then releaseShift() falling = false return end local state = Humanoid:GetState() local inAir = state == Enum.HumanoidStateType.Freefall or state == Enum.HumanoidStateType.Jumping local onGround = state == Enum.HumanoidStateType.Running or state == Enum.HumanoidStateType.RunningNoPhysics or state == Enum.HumanoidStateType.Landed local goingDown = Root.AssemblyLinearVelocity.Y < -1 if inAir and goingDown and not falling then falling = true fallY = Root.Position.Y end if falling then local params = RaycastParams.new() params.FilterType = Enum.RaycastFilterType.Exclude params.FilterDescendantsInstances = {Char, workspace.RaycastIgnore} local result = workspace:Raycast(Root.Position, Vector3.new(0, -50, 0), params) if result then local dist = Root.Position.Y - result.Position.Y local speed = math.abs(Root.AssemblyLinearVelocity.Y) local height = fallY - Root.Position.Y if speed > 1 and height > Config.MinHeight then local timeToLand = dist / speed if timeToLand < Config.ms and timeToLand > Config.ttl and not shiftPressed then pressShift() if env.v49 then env.v49 = 0 end if env.t7 and env.t7.Landing then pcall(function() env.t7.Landing.FallDamageOverride = true env.t7.Landing.ForceDampen = true end) end end elseif shiftPressed and height < 3 then releaseShift() end end end if onGround and falling then falling = false fallY = 0 if shiftPressed then -- Создаем новую задачу только если нет активной if not releaseTask then releaseTask = task.delay(0.3, function() releaseShift() releaseTask = nil end) end end end if not inAir and not onGround and falling then falling = false fallY = 0 if shiftPressed then if not releaseTask then releaseTask = task.delay(0.3, function() releaseShift() releaseTask = nil end) end end end end) end LocalPlayer.CharacterAdded:Connect(function(Char) task.wait(0.5) setup(Char) end) if LocalPlayer.Character then task.wait(0.5) setup(LocalPlayer.Character) end