-- ═══════════════════════════════════════════════════════════════════ -- ██ ULTIMATE G-FORCE DASH -- ═══════════════════════════════════════════════════════════════════ local Players = game:GetService("Players") local UserInputService = game:GetService("UserInputService") local RunService = game:GetService("RunService") local Workspace = game:GetService("Workspace") local TweenService = game:GetService("TweenService") local Debris = game:GetService("Debris") local player = Players.LocalPlayer local playerGui = player:WaitForChild("PlayerGui") local camera = Workspace.CurrentCamera -- ═══════════════════ settings ═══════════════════ local DASH_SPEED = 60 local FAST_FALL_SPEED = -40 local SKYDIVE_GRAVITY = 60 local NORMAL_GRAVITY = 196.2 local SLIDE_ANIM_ID = "rbxassetid://282574440" local SOUND_LAUNCH = "rbxassetid://4827310202" local SOUND_WIND = "rbxassetid://3744362814" local SOUND_LAND = "rbxassetid://9120386436" -- ══════════════════════════════════════════════════ local isBusy = false -- 🔒 Единый замок (блокирует кнопку до приземления) local slideAnimTrack = nil local activeConnections = {} local function clearConnections() for _, conn in pairs(activeConnections) do if conn and conn.Connected then conn:Disconnect() end end activeConnections = {} end -- 🧹 Очистка старых UI for _, v in ipairs(playerGui:GetChildren()) do if v.Name == "SlideUI" then v:Destroy() end end -- ─────────────── 1. UI ─────────────── local ui = Instance.new("ScreenGui") ui.Name = "SlideUI" ui.ResetOnSpawn = false ui.DisplayOrder = 999 ui.Parent = playerGui local glowFrame = Instance.new("Frame") glowFrame.Size = UDim2.new(0, 90, 0, 90) glowFrame.Position = UDim2.new(1, -200, 1, -300) glowFrame.BackgroundColor3 = Color3.fromRGB(0, 255, 200) glowFrame.BackgroundTransparency = 0.5 glowFrame.BorderSizePixel = 0 glowFrame.Parent = ui Instance.new("UICorner", glowFrame).CornerRadius = UDim.new(1, 0) local btnFrame = Instance.new("Frame") btnFrame.Size = UDim2.new(0, 75, 0, 75) btnFrame.Position = UDim2.new(0, 7.5, 0, 7.5) btnFrame.BackgroundColor3 = Color3.fromRGB(15, 15, 20) btnFrame.BorderSizePixel = 0 btnFrame.Parent = glowFrame Instance.new("UICorner", btnFrame).CornerRadius = UDim.new(1, 0) local btnGrad = Instance.new("UIGradient", btnFrame) btnGrad.Color = ColorSequence.new({ ColorSequenceKeypoint.new(0, Color3.fromRGB(40, 45, 60)), ColorSequenceKeypoint.new(0.5, Color3.fromRGB(20, 20, 30)), ColorSequenceKeypoint.new(1, Color3.fromRGB(5, 5, 10)) }) local stroke = Instance.new("UIStroke", btnFrame) stroke.Color = Color3.fromRGB(0, 255, 200) stroke.Thickness = 2.5 stroke.Transparency = 0.1 local icon = Instance.new("TextLabel") icon.Size = UDim2.fromScale(1, 1) icon.BackgroundTransparency = 1 icon.Text = "skydive" icon.TextSize = 45 icon.ZIndex = 2 icon.Parent = btnFrame local btn = Instance.new("TextButton") btn.Size = UDim2.fromScale(1, 1) btn.BackgroundTransparency = 1 btn.Text = "" btn.ZIndex = 3 btn.Parent = btnFrame -- Текст "in the air" local airText = Instance.new("TextLabel") airText.Size = UDim2.new(1, 0, 0, 20) airText.Position = UDim2.new(0, 0, 1, 5) airText.BackgroundTransparency = 1 airText.Text = "WAIT YOURE ARLEADY SKYDIVING" airText.TextColor3 = Color3.fromRGB(255, 50, 50) airText.Font = Enum.Font.GothamBold airText.TextSize = 14 airText.Visible = false airText.Parent = glowFrame -- ─────────────── 2. АНИМАЦИЯ ─────────────── local function setupAnimation(character) local humanoid = character:WaitForChild("Humanoid", 5) if not humanoid then return end local animator = humanoid:FindFirstChildOfClass("Animator") or Instance.new("Animator", humanoid) local anim = Instance.new("Animation") anim.AnimationId = SLIDE_ANIM_ID local success, track = pcall(function() return animator:LoadAnimation(anim) end) if success and track then slideAnimTrack = track slideAnimTrack.Priority = Enum.AnimationPriority.Action4 slideAnimTrack.Looped = true end end if player.Character then setupAnimation(player.Character) end player.CharacterAdded:Connect(function() setupAnimation(player.Character) Workspace.Gravity = NORMAL_GRAVITY isBusy = false clearConnections() btnFrame.BackgroundColor3 = Color3.fromRGB(15, 15, 20) airText.Visible = false end) -- ─────────────── 3. ЭФФЕКТ ПРИЗЕМЛЕНИЯ ─────────────── local function playImpactEffect(position) local landSnd = Instance.new("Sound", camera) landSnd.SoundId = SOUND_LAND landSnd.Volume = 1 landSnd.PlaybackSpeed = 0.8 landSnd:Play() Debris:AddItem(landSnd, 2) local wave = Instance.new("Part", Workspace) wave.Shape = Enum.PartType.Cylinder wave.Material = Enum.Material.Neon wave.Color = Color3.fromRGB(0, 255, 200) wave.Anchored = true wave.CanCollide = false wave.CFrame = CFrame.new(position) * CFrame.Angles(0, 0, math.rad(90)) wave.Size = Vector3.new(1, 5, 5) TweenService:Create(wave, TweenInfo.new(0.5, Enum.EasingStyle.Exponential, Enum.EasingDirection.Out), { Size = Vector3.new(1, 50, 50), Transparency = 1 }):Play() Debris:AddItem(wave, 0.5) local dust = Instance.new("ParticleEmitter", wave) dust.Texture = "rbxassetid://243660364" dust.Color = ColorSequence.new(Color3.fromRGB(0, 255, 200)) dust.Size = NumberSequence.new(3, 0) dust.Transparency = NumberSequence.new(0, 1) dust.Speed = NumberRange.new(20, 40) dust.Lifetime = NumberRange.new(0.4, 0.8) dust:Emit(40) local shakeTime = 0 local shakeConn shakeConn = RunService.RenderStepped:Connect(function(dt) shakeTime += dt if shakeTime < 0.4 then camera.CFrame = camera.CFrame * CFrame.new(math.random(-15, 15)/100, math.random(-15, 15)/100, 0) else shakeConn:Disconnect() end end) end -- ─────────────── 4. ЛОГИКА ─────────────── local function doAction() -- 🔒 Если мы уже в воздухе или на кулдауне — ничего не делаем if isBusy then return end local char = player.Character local hrp = char and char:FindFirstChild("HumanoidRootPart") local hum = char and char:FindFirstChild("Humanoid") if not hrp or not hum or hum.Health <= 0 then return end isBusy = true clearConnections() -- 🌍 Гравитация и прыжок Workspace.Gravity = SKYDIVE_GRAVITY hum.Jump = true hum:ChangeState(Enum.HumanoidStateType.Jumping) -- 🎨 UI (Блокируем кнопку) TweenService:Create(btnFrame, TweenInfo.new(0.1), {Size = UDim2.new(0, 60, 0, 60), Position = UDim2.new(0, 15, 0, 15)}):Play() task.delay(0.1, function() TweenService:Create(btnFrame, TweenInfo.new(0.3, Enum.EasingStyle.Elastic, Enum.EasingDirection.Out), {Size = UDim2.new(0, 75, 0, 75), Position = UDim2.new(0, 7.5, 0, 7.5)}):Play() end) btnFrame.BackgroundColor3 = Color3.fromRGB(50, 25, 10) -- Темнеет stroke.Color = Color3.fromRGB(255, 100, 0) -- Оранжевый airText.Visible = true -- 🎬 Анимация if slideAnimTrack then slideAnimTrack:Play(0.3) end -- 🔊 Звуки local launchSnd = Instance.new("Sound", hrp) launchSnd.SoundId = SOUND_LAUNCH launchSnd.Volume = 1 launchSnd:Play() Debris:AddItem(launchSnd, 2) local windSnd = Instance.new("Sound", hrp) windSnd.SoundId = SOUND_WIND windSnd.Volume = 0.5 windSnd.Looped = true windSnd:Play() TweenService:Create(camera, TweenInfo.new(0.3), {FieldOfView = 110}):Play() -- ✨ Эффекты local att0 = Instance.new("Attachment", hrp); att0.Position = Vector3.new(0, 1, 0) local att1 = Instance.new("Attachment", hrp); att1.Position = Vector3.new(0, -1, 0) local trail = Instance.new("Trail", hrp) trail.Attachment0 = att0; trail.Attachment1 = att1 trail.Color = ColorSequence.new(Color3.fromRGB(0, 255, 200)) trail.Lifetime = 0.4 local thruster = Instance.new("ParticleEmitter", hrp) thruster.Texture = "rbxassetid://243660364" thruster.Color = ColorSequence.new(Color3.fromRGB(0, 255, 200)) thruster.Size = NumberSequence.new(2, 0) thruster.Speed = NumberRange.new(10, 20) thruster.Rate = 100 local moveDir = hum.MoveDirection if moveDir.Magnitude < 0.1 then local camLook = camera.CFrame.LookVector moveDir = Vector3.new(camLook.X, 0, camLook.Z).Unit end local hasStopped = false local raycastParams = RaycastParams.new() raycastParams.FilterDescendantsInstances = {char} -- 🛑 ОСТАНОВКА (При касании пола) local function stopSkydive() if hasStopped then return end hasStopped = true isBusy = false -- 🔓 РАЗБЛОКИРОВЫВАЕМ КНОПКУ clearConnections() Workspace.Gravity = NORMAL_GRAVITY -- 🎨 Возврат UI TweenService:Create(camera, TweenInfo.new(0.3), {FieldOfView = 70}):Play() TweenService:Create(btnFrame, TweenInfo.new(0.3), {BackgroundColor3 = Color3.fromRGB(15, 15, 20)}):Play() TweenService:Create(stroke, TweenInfo.new(0.3), {Color = Color3.fromRGB(0, 255, 200)}):Play() airText.Visible = false -- Очистка if trail then trail:Destroy() end if att0 then att0:Destroy() end if att1 then att1:Destroy() end if thruster then thruster:Destroy() end if windSnd then windSnd:Destroy() end if slideAnimTrack then slideAnimTrack:Stop(0.3) end -- Торможение local stopVel = Vector3.new(0, hrp.AssemblyLinearVelocity.Y, 0) hrp.AssemblyLinearVelocity = hrp.AssemblyLinearVelocity:Lerp(stopVel, 0.5) playImpactEffect(hrp.Position) end -- Слушаем изменение состояния (Landed / Running) table.insert(activeConnections, hum.StateChanged:Connect(function(_, newState) if newState == Enum.HumanoidStateType.Landed or newState == Enum.HumanoidStateType.Running then task.wait(0.15) -- Даем время на прыжок, чтобы не отменить сразу if not hasStopped then stopSkydive() end end end)) -- Отслеживаем смерть table.insert(activeConnections, hum.Died:Connect(function() stopSkydive() end)) -- 🚀 Цикл физики и Рейкастов local flightConn flightConn = RunService.Heartbeat:Connect(function(dt) if not hrp or hum.Health <= 0 or hasStopped then return end local currentVel = hrp.AssemblyLinearVelocity local result = Workspace:Raycast(hrp.Position, Vector3.new(0, -6, 0), raycastParams) -- Если мы летим вниз и впереди пол — стоп! if result and currentVel.Y <= 0 then stopSkydive() return end local targetVel = Vector3.new(moveDir.X * DASH_SPEED, FAST_FALL_SPEED, moveDir.Z * DASH_SPEED) hrp.AssemblyLinearVelocity = currentVel:Lerp(targetVel, 1 - math.exp(-15 * dt)) end) table.insert(activeConnections, flightConn) end -- ─────────────── 5. ПРИВЯЗКА ─────────────── btn.Activated:Connect(doAction) UserInputService.InputBegan:Connect(function(input, gp) if gp then return end if input.KeyCode == Enum.KeyCode.C then doAction() end end) print("[God-Tier Dash] Кнопка работает 1 раз до приземления!")