local Players = game:GetService("Players") local RunService = game:GetService("RunService") local UserInputService = game:GetService("UserInputService") local TweenService = game:GetService("TweenService") local Debris = game:GetService("Debris") print("Script started - Debug: Services loaded") local player = Players.LocalPlayer local PlayerGui = player:WaitForChild("PlayerGui", 10) if not PlayerGui then warn("PlayerGui not found") return end -- Function to wait for character safely local function waitForCharacter() local character = player.Character or player.CharacterAdded:Wait() local humanoid = character:WaitForChild("Humanoid", 5) local rootPart = character:WaitForChild("HumanoidRootPart", 5) if not humanoid or not rootPart then warn("Humanoid or HumanoidRootPart not found") return nil end return character, humanoid, rootPart end local character, humanoid, rootPart = waitForCharacter() if not character then return end print("Character loaded - Debug: Initial character ready") local flying = false local flySpeed = 50 local bodyVelocity = Instance.new("BodyVelocity") bodyVelocity.MaxForce = Vector3.new(math.huge, math.huge, math.huge) bodyVelocity.Velocity = Vector3.new(0,0,0) bodyVelocity.Parent = nil -- Splash Screen with Fade In/Out local SplashGui = Instance.new("ScreenGui") SplashGui.ResetOnSpawn = false SplashGui.Enabled = true SplashGui.Parent = PlayerGui local SplashFrame = Instance.new("Frame") SplashFrame.Size = UDim2.new(0, 400, 0, 200) SplashFrame.Position = UDim2.new(0.5, -200, 0.5, -100) SplashFrame.BackgroundTransparency = 1 SplashFrame.BackgroundColor3 = Color3.fromRGB(30, 30, 30) SplashFrame.BorderSizePixel = 0 SplashFrame.Parent = SplashGui local SplashLabel = Instance.new("TextLabel") SplashLabel.Size = UDim2.new(1, 0, 0.5, 0) SplashLabel.Position = UDim2.new(0, 0, 0, 0) SplashLabel.BackgroundTransparency = 1 SplashLabel.TextColor3 = Color3.fromRGB(255, 255, 255) SplashLabel.Font = Enum.Font.GothamBlack SplashLabel.TextSize = 48 SplashLabel.Text = "Made by Riley" SplashLabel.TextTransparency = 1 SplashLabel.TextWrapped = true SplashLabel.TextYAlignment = Enum.TextYAlignment.Bottom SplashLabel.Parent = SplashFrame local DiscordLabel = Instance.new("TextLabel") DiscordLabel.Size = UDim2.new(0.8, 0, 0.5, 0) DiscordLabel.Position = UDim2.new(0, 0, 0.5, 0) DiscordLabel.BackgroundTransparency = 1 DiscordLabel.TextColor3 = Color3.fromRGB(114, 137, 218) DiscordLabel.Font = Enum.Font.GothamBold DiscordLabel.TextSize = 24 DiscordLabel.Text = "Join my Discord:\nhttps://discord.gg/DsewwYzm" DiscordLabel.TextTransparency = 1 DiscordLabel.TextWrapped = true DiscordLabel.TextYAlignment = Enum.TextYAlignment.Top DiscordLabel.Parent = SplashFrame -- Copy Button local CopyButton = Instance.new("TextButton") CopyButton.Size = UDim2.new(0, 80, 0, 30) CopyButton.Position = UDim2.new(1, -85, 0.5, 0) CopyButton.BackgroundColor3 = Color3.fromRGB(114, 137, 218) CopyButton.Text = "Copy" CopyButton.TextColor3 = Color3.fromRGB(255, 255, 255) CopyButton.Font = Enum.Font.GothamBold CopyButton.TextSize = 18 CopyButton.BorderSizePixel = 0 CopyButton.Parent = SplashFrame -- Copy functionality (requires executor support like setclipboard) CopyButton.MouseButton1Click:Connect(function() pcall(function() setclipboard("https://discord.gg/DsewwYzm") CopyButton.Text = "Copied!" CopyButton.BackgroundColor3 = Color3.fromRGB(50, 180, 50) task.wait(1) CopyButton.Text = "Copy" CopyButton.BackgroundColor3 = Color3.fromRGB(114, 137, 218) end) end) -- Fade animations local fadeIn = TweenService:Create(SplashFrame, TweenInfo.new(1, Enum.EasingStyle.Sine, Enum.EasingDirection.In), {BackgroundTransparency = 0.3}) local labelFadeIn = TweenService:Create(SplashLabel, TweenInfo.new(1, Enum.EasingStyle.Sine, Enum.EasingDirection.In), {TextTransparency = 0}) local discordFadeIn = TweenService:Create(DiscordLabel, TweenInfo.new(1, Enum.EasingStyle.Sine, Enum.EasingDirection.In), {TextTransparency = 0}) local fadeOut = TweenService:Create(SplashFrame, TweenInfo.new(1, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), {BackgroundTransparency = 1}) local labelFadeOut = TweenService:Create(SplashLabel, TweenInfo.new(1, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), {TextTransparency = 1}) local discordFadeOut = TweenService:Create(DiscordLabel, TweenInfo.new(1, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), {TextTransparency = 1}) fadeIn:Play() labelFadeIn:Play() discordFadeIn:Play() print("Splash GUI created - Debug: Animations started") -- Main GUI with Tabs task.delay(5, function() print("Loading main GUI - Debug: Delay complete") fadeOut:Play() labelFadeOut:Play() discordFadeOut:Play() task.wait(1) SplashGui:Destroy() local ScreenGui = Instance.new("ScreenGui") ScreenGui.Name = "FlightControlGui" ScreenGui.ResetOnSpawn = false ScreenGui.Enabled = true ScreenGui.IgnoreGuiInset = true ScreenGui.Parent = PlayerGui print("ScreenGui created - Debug: GUI parented") -- Main Frame local MainFrame = Instance.new("Frame") MainFrame.Size = UDim2.new(0, 300, 0, 400) MainFrame.Position = UDim2.new(0.5, -150, 0.5, -200) MainFrame.BackgroundColor3 = Color3.fromRGB(40, 40, 40) MainFrame.BackgroundTransparency = 0.2 MainFrame.BorderSizePixel = 0 MainFrame.ClipsDescendants = true MainFrame.Parent = ScreenGui print("MainFrame created - Debug: Frame setup") -- Draggable for MainFrame local dragging, dragInput, dragStart, startPos MainFrame.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then dragging = true dragStart = input.Position startPos = MainFrame.Position input.Changed:Connect(function() if input.UserInputState == Enum.UserInputState.End then dragging = false end end) end end) MainFrame.InputChanged:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then dragInput = input end end) UserInputService.InputChanged:Connect(function(input) if input == dragInput and dragging then local delta = input.Position - dragStart MainFrame.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y) end end) -- Resizable (unchanged) local ResizeHandle = Instance.new("TextButton", MainFrame) ResizeHandle.Size = UDim2.new(0, 20, 0, 20) ResizeHandle.Position = UDim2.new(1, -20, 1, -20) ResizeHandle.BackgroundColor3 = Color3.fromRGB(100, 100, 100) ResizeHandle.Text = "" ResizeHandle.BorderSizePixel = 0 local resizing, resizeStart, startSize ResizeHandle.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then resizing = true resizeStart = input.Position startSize = MainFrame.Size input.Changed:Connect(function() if input.UserInputState == Enum.UserInputState.End then resizing = false end end) end end) ResizeHandle.InputChanged:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then dragInput = input end end) UserInputService.InputChanged:Connect(function(input) if input == dragInput and resizing then local delta = input.Position - resizeStart local newWidth = math.max(200, startSize.X.Offset + delta.X) local newHeight = math.max(200, startSize.Y.Offset + delta.Y) MainFrame.Size = UDim2.new(0, newWidth, 0, newHeight) end end) -- Tab Bar local TabBar = Instance.new("Frame", MainFrame) TabBar.Size = UDim2.new(1, 0, 0, 40) TabBar.BackgroundColor3 = Color3.fromRGB(30, 30, 30) TabBar.BorderSizePixel = 0 local tabButtons = {} for i, name in ipairs({"Fly", "Settings", "Touch Fling", "Credits"}) do local button = Instance.new("TextButton", TabBar) button.Size = UDim2.new(0.25, 0, 1, 0) button.Position = UDim2.new((i-1)*0.25, 0, 0, 0) button.Text = name button.Font = Enum.Font.GothamBold button.TextSize = 16 button.TextColor3 = Color3.fromRGB(255, 255, 255) button.BackgroundColor3 = Color3.fromRGB(60, 60, 60) button.BorderSizePixel = 0 table.insert(tabButtons, {name = name, button = button, contentFrame = nil}) end -- Content Area local ContentArea = Instance.new("Frame", MainFrame) ContentArea.Size = UDim2.new(1, 0, 1, -40) ContentArea.Position = UDim2.new(0, 0, 0, 40) ContentArea.BackgroundTransparency = 1 ContentArea.ClipsDescendants = true -- Create Content Frames for _, tab in ipairs(tabButtons) do local contentFrame = Instance.new("Frame", ContentArea) contentFrame.Size = UDim2.new(1, 0, 1, 0) contentFrame.BackgroundTransparency = 1 contentFrame.Visible = tab.name == "Fly" tab.contentFrame = contentFrame tab.button.MouseButton1Click:Connect(function() for _, t in ipairs(tabButtons) do t.contentFrame.Visible = (t.name == tab.name) end print("Switched to tab:", tab.name) end) end -- Fly Tab Content local FlyFrame = tabButtons[1].contentFrame local ToggleButton = Instance.new("TextButton", FlyFrame) ToggleButton.Size = UDim2.new(0.8, 0, 0, 50) ToggleButton.Position = UDim2.new(0.1, 0, 0, 20) ToggleButton.Text = "Toggle Fly" ToggleButton.Font = Enum.Font.GothamBold ToggleButton.TextSize = 20 ToggleButton.TextColor3 = Color3.fromRGB(255, 255, 255) ToggleButton.BackgroundColor3 = Color3.fromRGB(70, 130, 180) ToggleButton.BorderSizePixel = 0 local StatusLabel = Instance.new("TextLabel", FlyFrame) StatusLabel.Size = UDim2.new(0.8, 0, 0, 30) StatusLabel.Position = UDim2.new(0.1, 0, 0, 80) StatusLabel.BackgroundTransparency = 1 StatusLabel.TextColor3 = Color3.fromRGB(255, 255, 255) StatusLabel.Font = Enum.Font.Gotham StatusLabel.TextSize = 16 StatusLabel.Text = "Off" local ArrowFrame = Instance.new("Frame", FlyFrame) ArrowFrame.Size = UDim2.new(0.8, 0, 0, 200) ArrowFrame.Position = UDim2.new(0.1, 0, 0, 120) ArrowFrame.BackgroundColor3 = Color3.fromRGB(30, 30, 30) ArrowFrame.BackgroundTransparency = 0.2 ArrowFrame.BorderSizePixel = 0 local activeDirections = {} local arrows = { {name="Forward", pos=UDim2.new(0.5,-25,0.5,-25), rotation=0} } for i, arrow in pairs(arrows) do local button = Instance.new("ImageButton", ArrowFrame) button.Size = UDim2.new(0,50,0,50) button.Position = arrow.pos button.BackgroundColor3 = Color3.fromRGB(70,130,180) button.BackgroundTransparency = 0.1 button.Image = "rbxassetid://4458877936" button.Rotation = arrow.rotation or 0 button.BorderSizePixel = 0 button.AutoButtonColor = true button.Name = "Arrow" .. i button.MouseButton1Down:Connect(function() activeDirections[arrow.name] = true print("Arrow pressed:", arrow.name) end) button.MouseButton1Up:Connect(function() activeDirections[arrow.name] = nil end) end -- Settings Tab Content local SettingsFrame = tabButtons[2].contentFrame local SpeedLabel = Instance.new("TextLabel", SettingsFrame) SpeedLabel.Size = UDim2.new(0.8, 0, 0, 30) SpeedLabel.Position = UDim2.new(0.1, 0, 0, 20) SpeedLabel.BackgroundTransparency = 1 SpeedLabel.TextColor3 = Color3.fromRGB(255, 255, 255) SpeedLabel.Font = Enum.Font.Gotham SpeedLabel.TextSize = 16 SpeedLabel.Text = "Fly Speed:" local SpeedInput = Instance.new("TextBox", SettingsFrame) SpeedInput.Size = UDim2.new(0.8, 0, 0, 30) SpeedInput.Position = UDim2.new(0.1, 0, 0, 50) SpeedInput.Text = tostring(flySpeed) SpeedInput.Font = Enum.Font.Gotham SpeedInput.TextSize = 16 SpeedInput.TextColor3 = Color3.fromRGB(255, 255, 255) SpeedInput.BackgroundColor3 = Color3.fromRGB(60, 60, 60) SpeedInput.BorderSizePixel = 0 SpeedInput.TextXAlignment = Enum.TextXAlignment.Center SpeedInput.FocusLost:Connect(function() local value = tonumber(SpeedInput.Text) if value and value > 0 then flySpeed = value print("Fly speed set to:", flySpeed) else SpeedInput.Text = tostring(flySpeed) end end) -- Touch Fling Tab Content local FlingFrame = tabButtons[3].contentFrame local TitleLabel = Instance.new("TextLabel", FlingFrame) TitleLabel.Size = UDim2.new(0.8, 0, 0, 30) TitleLabel.Position = UDim2.new(0.1, 0, 0, 10) TitleLabel.BackgroundTransparency = 1 TitleLabel.TextColor3 = Color3.fromRGB(255, 255, 255) TitleLabel.Font = Enum.Font.GothamBold TitleLabel.TextSize = 18 TitleLabel.Text = "Touch Fling (Touch players to fling)" local FlingToggleButton = Instance.new("TextButton", FlingFrame) FlingToggleButton.Size = UDim2.new(0.8, 0, 0, 40) FlingToggleButton.Position = UDim2.new(0.1, 0, 0, 50) FlingToggleButton.Text = "Toggle Touch Fling: OFF" FlingToggleButton.Font = Enum.Font.GothamBold FlingToggleButton.TextSize = 16 FlingToggleButton.TextColor3 = Color3.fromRGB(255, 255, 255) FlingToggleButton.BackgroundColor3 = Color3.fromRGB(200, 50, 50) FlingToggleButton.BorderSizePixel = 0 FlingToggleButton.TextXAlignment = Enum.TextXAlignment.Center local PowerLabel = Instance.new("TextLabel", FlingFrame) PowerLabel.Size = UDim2.new(0.8, 0, 0, 20) PowerLabel.Position = UDim2.new(0.1, 0, 0, 100) PowerLabel.BackgroundTransparency = 1 PowerLabel.TextColor3 = Color3.fromRGB(255, 255, 255) PowerLabel.Font = Enum.Font.Gotham PowerLabel.TextSize = 14 PowerLabel.Text = "Fling Power (1-500): 100" local PowerInput = Instance.new("TextBox", FlingFrame) PowerInput.Size = UDim2.new(0.8, 0, 0, 25) PowerInput.Position = UDim2.new(0.1, 0, 0, 120) PowerInput.Text = "100" PowerInput.Font = Enum.Font.Gotham PowerInput.TextSize = 14 PowerInput.TextColor3 = Color3.fromRGB(255, 255, 255) PowerInput.BackgroundColor3 = Color3.fromRGB(60, 60, 60) PowerInput.BorderSizePixel = 0 PowerInput.TextXAlignment = Enum.TextXAlignment.Center local flingEnabled = false local flingPart = nil local spinConnection = nil local touchConnection = nil local flingPower = 100 PowerInput.FocusLost:Connect(function() local value = tonumber(PowerInput.Text) if value and value >= 1 and value <= 500 then flingPower = value PowerLabel.Text = "Fling Power (1-500): " .. flingPower print("Fling power set to:", flingPower) else PowerInput.Text = tostring(flingPower) end end) local function getTorso() return character:FindFirstChild("Torso") or character:FindFirstChild("UpperTorso") end local function createFlingPart() pcall(function() if flingPart then flingPart:Destroy() end local torso = getTorso() if not torso or not rootPart then return end flingPart = Instance.new("Part") flingPart.Name = "FlingPart_" .. player.Name flingPart.Size = Vector3.new(4, 4, 4) -- Larger for better collision flingPart.Transparency = 1 flingPart.CanCollide = false -- Non-colliding for stealth flingPart.Anchored = false flingPart.Position = torso.Position flingPart.Parent = workspace print("Fling part created - Debug: Part in workspace") -- Weld to torso local weld = Instance.new("WeldConstraint") weld.Part0 = torso weld.Part1 = flingPart weld.Parent = flingPart -- Fast spin loop spinConnection = RunService.Heartbeat:Connect(function() if flingPart and flingPart.Parent then flingPart.CFrame = flingPart.CFrame * CFrame.Angles(math.rad(50), math.rad(50), math.rad(50)) -- 3D spin else if spinConnection then spinConnection:Disconnect() end end end) -- Touch detection touchConnection = flingPart.Touched:Connect(function(hit) if not flingEnabled then return end local hitChar = hit.Parent local hitHumanoid = hitChar:FindFirstChildOfClass("Humanoid") if hitHumanoid and hitChar ~= character and Players:GetPlayerFromCharacter(hitChar) then local hitRoot = hitChar:FindFirstChild("HumanoidRootPart") or hitChar:FindFirstChild("Torso") or hitChar:FindFirstChild("UpperTorso") if hitRoot then local direction = (hitRoot.Position - rootPart.Position).Unit local bodyVel = Instance.new("BodyVelocity") bodyVel.MaxForce = Vector3.new(4000, 4000, 4000) bodyVel.Velocity = direction * flingPower + Vector3.new(0, math.random(50, 100), 0) bodyVel.Parent = hitRoot Debris:AddItem(bodyVel, 0.3) print("Flung player:", hitChar.Name) end end end) print("Fling touch connected - Debug: Ready to fling") end) end FlingToggleButton.MouseButton1Click:Connect(function() flingEnabled = not flingEnabled FlingToggleButton.Text = "Toggle Touch Fling: " .. (flingEnabled and "ON" or "OFF") FlingToggleButton.BackgroundColor3 = flingEnabled and Color3.fromRGB(50, 180, 50) or Color3.fromRGB(200, 50, 50) print("Touch Fling toggled:", flingEnabled) if flingEnabled then createFlingPart() else if spinConnection then spinConnection:Disconnect() end if touchConnection then touchConnection:Disconnect() end if flingPart then flingPart:Destroy() end flingPart = nil end end) -- Handle character respawn player.CharacterAdded:Connect(function(newChar) print("Character respawned - Debug: Updating references") character = newChar task.wait(2) -- Wait for full load humanoid = character:WaitForChild("Humanoid", 5) rootPart = character:WaitForChild("HumanoidRootPart", 5) if not humanoid or not rootPart then warn("Respawn failed - Debug: Missing parts") return end bodyVelocity.Parent = nil -- Reset fly flying = false if flingEnabled then task.wait(1) createFlingPart() end print("Respawn handled - Debug: Fling recreated if enabled") end) -- Credits Tab local CreditsFrame = tabButtons[4].contentFrame local CreditLabel = Instance.new("TextLabel", CreditsFrame) CreditLabel.Size = UDim2.new(0.8, 0, 0, 50) CreditLabel.Position = UDim2.new(0.1, 0, 0, 20) CreditLabel.BackgroundTransparency = 1 CreditLabel.Text = "Made by Riley\nFlight Control GUI\nVersion 1.1 (Fixed)" CreditLabel.Font = Enum.Font.Gotham CreditLabel.TextSize = 18 CreditLabel.TextColor3 = Color3.fromRGB(200, 200, 200) CreditLabel.TextXAlignment = Enum.TextXAlignment.Center CreditLabel.TextYAlignment = Enum.TextYAlignment.Top -- Centered Draggable Hide/Show Button local HideShowButton = Instance.new("TextButton", ScreenGui) HideShowButton.Size = UDim2.new(0, 50, 0, 50) HideShowButton.Position = UDim2.new(0.5, -25, 0.5, -25) -- Centered HideShowButton.Text = "Show" HideShowButton.Font = Enum.Font.GothamBold HideShowButton.TextSize = 16 HideShowButton.TextColor3 = Color3.fromRGB(255, 255, 255) HideShowButton.BackgroundColor3 = Color3.fromRGB(60, 60, 60) HideShowButton.BackgroundTransparency = 0.2 HideShowButton.BorderSizePixel = 0 -- Draggable for Button (separate variables) local buttonDragging, buttonDragInput, buttonDragStart, buttonStartPos HideShowButton.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then buttonDragging = true buttonDragStart = input.Position buttonStartPos = HideShowButton.Position input.Changed:Connect(function() if input.UserInputState == Enum.UserInputState.End then buttonDragging = false end end) end end) HideShowButton.InputChanged:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then buttonDragInput = input end end) UserInputService.InputChanged:Connect(function(input) if input == buttonDragInput and buttonDragging then local delta = input.Position - buttonDragStart HideShowButton.Position = UDim2.new(buttonStartPos.X.Scale, buttonStartPos.X.Offset + delta.X, buttonStartPos.Y.Scale, buttonStartPos.Y.Offset + delta.Y) end end) local guiVisible = false MainFrame.Visible = false HideShowButton.MouseButton1Click:Connect(function() guiVisible = not guiVisible MainFrame.Visible = guiVisible HideShowButton.Text = guiVisible and "Hide" or "Show" print("GUI visibility toggled:", guiVisible) end) -- Flying Toggle local function toggleFlying() pcall(function() flying = not flying humanoid.PlatformStand = flying bodyVelocity.Parent = flying and rootPart or nil ToggleButton.BackgroundColor3 = flying and Color3.fromRGB(50, 180, 50) or Color3.fromRGB(70, 130, 180) StatusLabel.Text = flying and "On" or "Off" print("Flying toggled:", flying) end) end ToggleButton.MouseButton1Click:Connect(toggleFlying) -- Fly Movement Loop RunService.RenderStepped:Connect(function() if flying and rootPart then pcall(function() local moveVec = Vector3.new(0, 0, 0) local camera = workspace.CurrentCamera if activeDirections["Forward"] then moveVec = moveVec + camera.CFrame.LookVector end -- Add more directions if needed (e.g., backward, left, right arrows) if moveVec.Magnitude > 0 then bodyVelocity.Velocity = moveVec.Unit * flySpeed else bodyVelocity.Velocity = Vector3.new(0, 0, 0) end end) end end) print("GUI setup complete - Debug: Script fully loaded. Check console for issues.") end)