-- FLING SCRIPT FOR LUA EXECUTOR WITH RAYFIELD MENU local Players = game:GetService("Players") local UserInputService = game:GetService("UserInputService") local RunService = game:GetService("RunService") local TweenService = game:GetService("TweenService") local LocalPlayer = Players.LocalPlayer local PlayerGui = LocalPlayer:WaitForChild("PlayerGui") local isFlinging = false local cooldown = false local chain = 0 local connections = {} -- DEBUG MODE local DEBUG = true local function debug(msg) if DEBUG then print("[DEBUG] " .. msg) end end -- SETTINGS local Settings = { FlingEnabled = true, LaunchDirection = "Diagonal", -- "Up", "Diagonal", "Bounce" DiagonalPower = 175, VerticalPower = 1, SpinSpeed = 50, FlashDuration = 0.5, DiagonalDuration = 1, MinLaunchPower = 230, MaxLaunchPower = 390, DebugMode = true, BounceIntensity = 1.5, CooldownEnabled = true, CooldownDuration = 2 } -- Rayfield Library local Rayfield = loadstring(game:HttpGet('https://sirius.menu/rayfield'))() -- Create Window local Window = Rayfield:CreateWindow({ Name = "⚡ Fling Control Panel", LoadingTitle = "Fling Script", LoadingSubtitle = "by Copilot", ConfigurationSaving = { Enabled = true, FolderName = "FlingScript", FileName = "FlingSettings" }, Icon = 0, IntroEnabled = true, IntroText = "Fling Script Loaded!", IntroIcon = "rbxassetid://9713629075", CloseCallback = function() end, }) -- Main Tab local MainTab = Window:CreateTab("🎮 Main", 4483362458) MainTab:CreateToggle({ Name = "Fling Enabled", CurrentValue = Settings.FlingEnabled, Flag = "FlingEnabled", Callback = function(Value) Settings.FlingEnabled = Value debug("Fling Enabled: " .. tostring(Value)) end, }) MainTab:CreateDropdown({ Name = "Launch Direction", Options = {"Up", "Diagonal", "Bounce"}, CurrentOption = {"Diagonal"}, MultipleOptions = false, Flag = "LaunchDirection", Callback = function(Options) Settings.LaunchDirection = Options[1] debug("Launch Direction set to: " .. Options[1]) end, }) MainTab:CreateButton({ Name = "🚀 Test Fling (Press F)", Callback = function() debug("Test fling button pressed") end, }) -- Settings Tab local SettingsTab = Window:CreateTab("⚙️ Settings", 4483362458) SettingsTab:CreateSlider({ Name = "Diagonal Power", Range = {50, 300}, Increment = 10, Suffix = "Power", CurrentValue = Settings.DiagonalPower, Flag = "DiagonalPower", Callback = function(Value) Settings.DiagonalPower = Value debug("Diagonal Power set to: " .. Value) end, }) SettingsTab:CreateSlider({ Name = "Bounce Intensity", Range = {0.5, 3}, Increment = 0.1, Suffix = "x", CurrentValue = Settings.BounceIntensity, Flag = "BounceIntensity", Callback = function(Value) Settings.BounceIntensity = Value debug("Bounce Intensity set to: " .. Value) end, }) SettingsTab:CreateSlider({ Name = "Vertical Power", Range = {0.5, 3}, Increment = 0.1, Suffix = "x", CurrentValue = Settings.VerticalPower, Flag = "VerticalPower", Callback = function(Value) Settings.VerticalPower = Value debug("Vertical Power set to: " .. Value) end, }) SettingsTab:CreateSlider({ Name = "Spin Speed", Range = {20, 100}, Increment = 5, Suffix = "Speed", CurrentValue = Settings.SpinSpeed, Flag = "SpinSpeed", Callback = function(Value) Settings.SpinSpeed = Value debug("Spin Speed set to: " .. Value) end, }) SettingsTab:CreateSlider({ Name = "Flash Duration", Range = {0.1, 2}, Increment = 0.1, Suffix = "s", CurrentValue = Settings.FlashDuration, Flag = "FlashDuration", Callback = function(Value) Settings.FlashDuration = Value debug("Flash Duration set to: " .. Value) end, }) SettingsTab:CreateSlider({ Name = "Launch Duration", Range = {0.5, 3}, Increment = 0.1, Suffix = "s", CurrentValue = Settings.DiagonalDuration, Flag = "DiagonalDuration", Callback = function(Value) Settings.DiagonalDuration = Value debug("Launch Duration set to: " .. Value) end, }) SettingsTab:CreateSlider({ Name = "Min Launch Power", Range = {50, 300}, Increment = 10, Suffix = "Power", CurrentValue = Settings.MinLaunchPower, Flag = "MinLaunchPower", Callback = function(Value) Settings.MinLaunchPower = Value debug("Min Launch Power set to: " .. Value) end, }) SettingsTab:CreateSlider({ Name = "Max Launch Power", Range = {100, 500}, Increment = 10, Suffix = "Power", CurrentValue = Settings.MaxLaunchPower, Flag = "MaxLaunchPower", Callback = function(Value) Settings.MaxLaunchPower = Value debug("Max Launch Power set to: " .. Value) end, }) -- Cooldown Tab local CooldownTab = Window:CreateTab("⏱️ Cooldown", 4483362458) CooldownTab:CreateToggle({ Name = "Cooldown Enabled", CurrentValue = Settings.CooldownEnabled, Flag = "CooldownEnabled", Callback = function(Value) Settings.CooldownEnabled = Value debug("Cooldown Enabled: " .. tostring(Value)) end, }) CooldownTab:CreateSlider({ Name = "Cooldown Duration", Range = {0.5, 10}, Increment = 0.5, Suffix = "s", CurrentValue = Settings.CooldownDuration, Flag = "CooldownDuration", Callback = function(Value) Settings.CooldownDuration = Value debug("Cooldown Duration set to: " .. Value .. " seconds") end, }) CooldownTab:CreateLabel("⏱️ Cooldown will prevent spam fling") CooldownTab:CreateLabel("Disable it for unlimited fling!") -- Debug Tab local DebugTab = Window:CreateTab("🐛 Debug", 4483362458) DebugTab:CreateToggle({ Name = "Debug Mode", CurrentValue = Settings.DebugMode, Flag = "DebugMode", Callback = function(Value) Settings.DebugMode = Value DEBUG = Value debug("Debug Mode: " .. tostring(Value)) end, }) DebugTab:CreateButton({ Name = "Print Settings", Callback = function() print("=== CURRENT SETTINGS ===") for k, v in pairs(Settings) do print(k .. ": " .. tostring(v)) end print("========================") end, }) DebugTab:CreateButton({ Name = "Reset Cooldown", Callback = function() cooldown = false debug("✅ Cooldown reset!") end, }) DebugTab:CreateButton({ Name = "Clear Console", Callback = function() debug("Console cleared") end, }) -- Cleanup function local function cleanup() isFlinging = false for _, conn in ipairs(connections) do if conn and conn.Connected then conn:Disconnect() end end connections = {} end -- Setup character function local function setupCharacter(character) cleanup() local humanoid = character:WaitForChild("Humanoid", 5) local root = character:WaitForChild("HumanoidRootPart", 5) local head = character:WaitForChild("Head", 5) if not (humanoid and root and head) then debug("Failed to get character parts") return end debug("✅ Character setup complete!") -- White Flash local function createWhiteFlash() local gui = PlayerGui:FindFirstChild("FlingFlashGui") if gui then gui:Destroy() end gui = Instance.new("ScreenGui") gui.Name = "FlingFlashGui" gui.ResetOnSpawn = false gui.IgnoreGuiInset = true gui.DisplayOrder = 200 gui.Parent = PlayerGui local whiteFlash = Instance.new("Frame") whiteFlash.Size = UDim2.new(1, 0, 1, 0) whiteFlash.BackgroundColor3 = Color3.new(1, 1, 1) whiteFlash.BackgroundTransparency = 0.35 whiteFlash.Visible = true whiteFlash.Parent = gui task.wait(Settings.FlashDuration) gui:Destroy() end -- UP LAUNCH local function launchUp(rj) debug("⬆️ Launching UP!") local upPower = math.random(Settings.MinLaunchPower, Settings.MaxLaunchPower) root.AssemblyLinearVelocity = Vector3.new(0, upPower * Settings.VerticalPower, 0) -- Keep going up for duration local upConn = RunService.Heartbeat:Connect(function() if not character.Parent or not root then return end root.AssemblyLinearVelocity = Vector3.new(0, upPower * Settings.VerticalPower, 0) end) table.insert(connections, upConn) task.wait(Settings.DiagonalDuration) upConn:Disconnect() table.remove(connections, #connections) end -- DIAGONAL LAUNCH (Fixed direction) local function launchDiagonal(rj) debug("↗️ Launching DIAGONAL!") local diagonalPower = Settings.DiagonalPower local diagonalAngle = math.rad(45) local diagonalX = math.cos(diagonalAngle) * diagonalPower local diagonalY = math.sin(diagonalAngle) * diagonalPower * Settings.VerticalPower local diagonalZ = math.sin(diagonalAngle) * diagonalPower root.AssemblyLinearVelocity = Vector3.new(diagonalX, diagonalY, diagonalZ) local diagonalConn = RunService.Heartbeat:Connect(function() if not character.Parent or not root then return end root.AssemblyLinearVelocity = Vector3.new(diagonalX, diagonalY, diagonalZ) end) table.insert(connections, diagonalConn) task.wait(Settings.DiagonalDuration) diagonalConn:Disconnect() table.remove(connections, #connections) end -- BOUNCING LAUNCH local function launchBounce(rj) debug("🔄 Launching with BOUNCE!") local elapsedTime = 0 local bounceTime = 0.2 local bounceConn = RunService.Heartbeat:Connect(function(deltaTime) if not character.Parent or not root then return end elapsedTime = elapsedTime + deltaTime if elapsedTime >= bounceTime then elapsedTime = 0 local randomAngleX = math.rad(math.random(20, 70)) local randomAngleY = math.rad(math.random(0, 360)) local randomAngleZ = math.rad(math.random(20, 70)) local bounceX = math.sin(randomAngleY) * math.cos(randomAngleX) * Settings.DiagonalPower * Settings.BounceIntensity local bounceY = math.sin(randomAngleX) * Settings.DiagonalPower * Settings.VerticalPower * Settings.BounceIntensity local bounceZ = math.cos(randomAngleY) * math.cos(randomAngleX) * Settings.DiagonalPower * Settings.BounceIntensity root.AssemblyLinearVelocity = Vector3.new(bounceX, bounceY, bounceZ) debug("🔄 Direction changed: X=" .. math.floor(bounceX) .. ", Y=" .. math.floor(bounceY) .. ", Z=" .. math.floor(bounceZ)) end end) table.insert(connections, bounceConn) task.wait(Settings.DiagonalDuration) bounceConn:Disconnect() table.remove(connections, #connections) end -- Main Fling local function attemptFling() if not Settings.FlingEnabled then debug("❌ Fling is disabled!") return end if isFlinging then debug("❌ Already flinging!") return end if Settings.CooldownEnabled and cooldown then debug("❌ Fling is on cooldown!") return end if not root or not humanoid or humanoid.Health <= 0 or not root.Parent then debug("❌ Character invalid!") return end debug("✅ FLING ACTIVATED! Direction: " .. Settings.LaunchDirection) isFlinging = true -- Set cooldown if enabled if Settings.CooldownEnabled then cooldown = true debug("⏱️ Cooldown started: " .. Settings.CooldownDuration .. " seconds") end -- Freeze character FIRST root.Anchored = true humanoid.PlatformStand = true humanoid.AutoRotate = false -- Set to Freefall state for falling animation humanoid:ChangeState(Enum.HumanoidStateType.Freefall) -- RANDOM ROTATION BEFORE WHITE FLASH local rj = root:FindFirstChild("RootJoint") if rj then local randomRx = math.rad(math.random(0, 360)) local randomRy = math.rad(math.random(0, 360)) local randomRz = math.rad(math.random(0, 360)) rj.C0 = CFrame.new(0, 0, 0) * CFrame.Angles(randomRx, randomRy, randomRz) debug("🔄 Random rotation applied!") end -- LAUNCH SOUND PLAYS local launch = Instance.new("Sound") launch.SoundId = "rbxassetid://127303659443091" launch.Volume = 2 launch.Parent = root launch:Play() game.Debris:AddItem(launch, 4) -- Windup sound local windup = Instance.new("Sound") windup.SoundId = "rbxassetid://114313517864862" windup.Volume = 1.6 windup.Parent = root windup:Play() game.Debris:AddItem(windup, 3) -- Show white flash AFTER random rotation createWhiteFlash() -- IMMEDIATELY unanchor after flash ends root.Anchored = false -- No collide for _, v in ipairs(character:GetDescendants()) do if v:IsA("BasePart") then v.CanCollide = false end end -- Spin sound local spinSound = Instance.new("Sound") spinSound.SoundId = "rbxassetid://86100395045909" spinSound.Volume = 1.1 spinSound.Looped = true spinSound.Parent = root spinSound:Play() -- Jump to transition from freefall humanoid:ChangeState(Enum.HumanoidStateType.Jumping) -- Spin effect with configurable speed local rx, ry, rz = math.rad(math.random(0, 360)), math.rad(math.random(0, 360)), math.rad(math.random(0, 360)) local spinConn = RunService.RenderStepped:Connect(function(dt) if not character.Parent then return end rx += Settings.SpinSpeed * dt ry += (Settings.SpinSpeed * 0.87) * dt rz += (Settings.SpinSpeed * 0.95) * dt if rj then rj.C0 = CFrame.new(0, 0, 0) * CFrame.Angles(rx, ry, rz) end end) table.insert(connections, spinConn) -- LAUNCH BASED ON SELECTED DIRECTION if Settings.LaunchDirection == "Up" then launchUp(rj) elseif Settings.LaunchDirection == "Diagonal" then launchDiagonal(rj) elseif Settings.LaunchDirection == "Bounce" then launchBounce(rj) end -- End fling task.wait(0.3) spinConn:Disconnect() spinSound:Stop() -- FIX ROTATION - Reset to normal position if rj then rj.C0 = CFrame.new(0, 0, 0) * CFrame.Angles(-math.pi/2, 0, math.pi) end root.Anchored = false humanoid.PlatformStand = false humanoid.AutoRotate = true isFlinging = false debug("✅ Fling complete!") -- Handle cooldown after fling completes if Settings.CooldownEnabled then task.wait(Settings.CooldownDuration) cooldown = false debug("✅ Cooldown finished!") end end -- Input binding for this character local inputConn = UserInputService.InputBegan:Connect(function(input, gp) if gp then return end if input.KeyCode == Enum.KeyCode.F or input.KeyCode == Enum.KeyCode.ButtonX then attemptFling() end end) table.insert(connections, inputConn) end -- Character management if LocalPlayer.Character then setupCharacter(LocalPlayer.Character) end local charAddedConn = LocalPlayer.CharacterAdded:Connect(function(character) debug("New character detected, setting up...") setupCharacter(character) end) -- Cleanup on character removing LocalPlayer.CharacterRemoving:Connect(cleanup) debug("✅ Fling script ready! Press E to fling.") Rayfield:Notify({ Title = "Fling Script", Content = "Script loaded! Press E to fling.", Duration = 6.5, Image = 4483362458, })