local Players = game:GetService("Players") local GuiService = game:GetService("GuiService") local StarterGui = game:GetService("StarterGui") local player = Players.LocalPlayer local playerGui = player:WaitForChild("PlayerGui") pcall(function() StarterGui:SetCore("SendNotification", { Title = "Air Dive Button Script"; Text = "Made by Legend. Have fun."; Duration = 6; Button1 = "Ok"; }) end) local function getJumpButton() local touchGui = playerGui:WaitForChild("TouchGui", 10) if not touchGui then return nil end local touchControlFrame = touchGui:WaitForChild("TouchControlFrame", 10) if not touchControlFrame then return nil end local jumpButton = touchControlFrame:FindFirstChild("JumpButton") return jumpButton end local jumpButton = getJumpButton() if not jumpButton then warn("Jump button not found!") return end local diveButton = jumpButton:Clone() diveButton.Name = "DiveButton" diveButton.Parent = jumpButton.Parent diveButton.Rotation = 180 diveButton.Position = UDim2.new( jumpButton.Position.X.Scale, jumpButton.Position.X.Offset, jumpButton.Position.Y.Scale, jumpButton.Position.Y.Offset - jumpButton.Size.Y.Offset - 10 ) local function isInAir() local character = player.Character if not character or not character:FindFirstChild("HumanoidRootPart") then return false end local root = character.HumanoidRootPart local rayOrigin = root.Position local rayDirection = Vector3.new(0, -5, 0) local raycastParams = RaycastParams.new() raycastParams.FilterDescendantsInstances = {character} raycastParams.FilterType = Enum.RaycastFilterType.Blacklist local result = workspace:Raycast(rayOrigin, rayDirection, raycastParams) if result then local distance = (rayOrigin - result.Position).Magnitude return distance > 0.1 end return true end local function dive() local character = player.Character if not character then return end local humanoidRootPart = character:FindFirstChild("HumanoidRootPart") if humanoidRootPart and isInAir() then humanoidRootPart.Velocity = Vector3.new(0, -115, 0) end end diveButton.MouseButton1Down:Connect(dive)