local Rayfield = loadstring(game:HttpGet('https://sirius.menu/rayfield'))() local Window = Rayfield:CreateWindow({ Name = "ScriptFusionX | The Lanes Bowling", Icon = 0, -- Icon in Topbar. Can use Lucide Icons (string) or Roblox Image (number). 0 to use no icon (default). LoadingTitle = "AutoStrike", LoadingSubtitle = "By VoiderPlayzYT", Theme = "Default", -- Check https://docs.sirius.menu/rayfield/configuration/themes DisableRayfieldPrompts = false, DisableBuildWarnings = false, -- Prevents Rayfield from warning when the script has a version mismatch with the interface ConfigurationSaving = { Enabled = true, FolderName = "ScriptFusionX", -- Create a custom folder for your hub/game FileName = "AutoStrike" }, Discord = { Enabled = false, -- Prompt the user to join your Discord server if their executor supports it Invite = "noinvitelink", -- The Discord invite code, do not include discord.gg/. E.g. discord.gg/ ABCD would be ABCD RememberJoins = true -- Set this to false to make them join the discord every time they load it up }, KeySystem = false, -- Set this to true to use our key system KeySettings = { Title = "Untitled", Subtitle = "Key System", Note = "No method of obtaining the key is provided ", -- Use this to tell the user how to get a key FileName = "Key", -- It is recommended to use something unique as other scripts using Rayfield may overwrite your key file SaveKey = true, -- The user's key will be saved, but if you change the key, they will be unable to use your script GrabKeyFromSite = true, -- If this is true, set Key below to the RAW site you would like Rayfield to get the key from Key = {"Bowling"} -- List of keys that will be accepted by the system, can be RAW file links (pastebin, github etc) or simple strings ("hello","key22") } }) local waittime = 0.05 local keybind = Enum.KeyCode.X local Keybind_ = "X" local EnabledAuto = false local BodyVelocityonfalse = false local mode = "Normal" local BallSpeedMPH = 5 local debug_ = { Enabled = false, AngularV = { X = 0, Y = 0, Z = 10, }, Velocity = { X = 0, Y = 0, Z = -15, }, } --[[ local debug_ = false local debug_x = 0 local debug_y = 0 local debug_z = 10 ]] local main = Window:CreateTab("Main", 4483362458) -- Title, Image local mainsec = main:CreateSection("AutoStrike") if game.Players.LocalPlayer.Name == "Darfy_XD" then debug_.Enabled = true local debug_tab = Window:CreateTab("Debug", 4483362458) local debugsec = debug_tab:CreateSection("Debugging") local bodyagnu = debug_tab:CreateSection("BodyAngularVelocity") local debug_x = debug_tab:CreateInput({ Name = "Changes X from the BodyAngularVelocity", CurrentValue = "0", PlaceholderText = "Number", RemoveTextAfterFocusLost = false, Flag = "Xdebugging", Callback = function(Text) debug_.AngularV.X = Text end, }) local debug_y = debug_tab:CreateInput({ Name = "Changes Y from the BodyAngularVelocity", CurrentValue = "0", PlaceholderText = "Number", RemoveTextAfterFocusLost = false, Flag = "Ydebugging", Callback = function(Text) debug_.AngularV.Y = Text end, }) local debug_z = debug_tab:CreateInput({ Name = "Changes Z from the BodyAngularVelocity", CurrentValue = "10", PlaceholderText = "Number", RemoveTextAfterFocusLost = false, Flag = "Zdebugging", Callback = function(Text) debug_.AngularV.Z = Text end, }) local bodyvelo = debug_tab:CreateSection("Debugging") local debug_vx = debug_tab:CreateInput({ Name = "Changes X from the BodyVelocity", CurrentValue = "0", PlaceholderText = "Number", RemoveTextAfterFocusLost = false, Flag = "vXdebugging", Callback = function(Text) debug_.Velocity.X = Text end, }) local debug_vy = debug_tab:CreateInput({ Name = "Changes Y from the BodyVelocity", CurrentValue = "0", PlaceholderText = "Number", RemoveTextAfterFocusLost = false, Flag = "vYdebugging", Callback = function(Text) debug_.Velocity.Y = Text end, }) local debug_vz = debug_tab:CreateInput({ Name = "Changes Z from the BodyVelocity", CurrentValue = "-15", PlaceholderText = "Number", RemoveTextAfterFocusLost = false, Flag = "vZdebugging", Callback = function(Text) debug_.Velocity.Z = Text end, }) end local Input = main:CreateInput({ Name = "Wait between rotating the pins one by one", CurrentValue = "0.05", PlaceholderText = "Wait Number seconds", RemoveTextAfterFocusLost = false, Flag = "waitbetween", Callback = function(Text) waittime = Text end, }) local KeyBind = main:CreateInput({ Name = "KeyBind for AutoStrike Put the Keybind as Captilzed", CurrentValue = "X", PlaceholderText = "X", RemoveTextAfterFocusLost = false, Flag = "keybind", Callback = function(Text) keybind = Enum.KeyCode[Text] Keybind_ = "'".. Text.. "'" print(keybind) Rayfield:Notify({ Title = "AutoStrike", Content = "Press ".. Text.. " to Rotate Pins (You can change the keybind in the Main Tab)", Duration = 6.5, Image = 4483362458, }) end, }) local ModeChanger = main:CreateDropdown({ Name = "Mode", Options = {"Normal","Ball"}, CurrentOption = {"Normal"}, MultipleOptions = false, Flag = "Dropdown1", -- A flag is the identifier for the configuration file, make sure every element has a different flag if you're using configuration saving to ensure no overlaps Callback = function(Options) mode = table.concat(Options) print("Mode changed to ".. mode) end, }) local BallMph = main:CreateSlider({ Name = "Ball Speed (MPH)", Range = {0, 50}, Increment = 1, Suffix = "MPH", CurrentValue = 5, Flag = "Slider1", -- A flag is the identifier for the configuration file, make sure every element has a different flag if you're using configuration saving to ensure no overlaps Callback = function(Value) BallSpeedMPH = Value end, }) local toggle = main:CreateToggle({ Name = "AutoStrike", CurrentValue = false, Flag = "autostriketoggle", -- A flag is the identifier for the configuration file, make sure every element has a different flag if you're using configuration saving to ensure no overlaps Callback = function(Value) EnabledAuto = Value if Value == true then Rayfield:Notify({ Title = "AutoStrike", Content = "Press ".. Keybind_.. " to Rotate Pins (You can change the keybind in the Main Tab or ball strike)", Duration = 6.5, Image = 4483362458, }) end end, }) local tooglevelocity = main:CreateToggle({ Name = "BodyVelocity", CurrentValue = false, Flag = "AutoVelocity", -- A flag is the identifier for the configuration file, make sure every element has a different flag if you're using configuration saving to ensure no overlaps Callback = function(Value) BodyVelocityonfalse = Value end }) function getLanes() local found = false for i,v in pairs(game.Workspace.LaneSets:GetDescendants()) do --print(v.Name) if v.Name == "LanePlayer" then if v.Value == game.Players.LocalPlayer then warn("Returned ".. v.Parent.Parent:GetFullName()) found = true return v.Parent.Parent end end end end local ball = coroutine.create(function() while true do local success, result = pcall(function() if mode ~= "Ball" then task.wait(0.1) else function getLanesBall() local found = false for i,v in pairs(game.Workspace.LaneSets:GetDescendants()) do --print(v.Name) if v.Name == "LanePlayer" then if v.Value == game.Players.LocalPlayer then --warn("Returned ".. v.Parent.Parent:GetFullName()) found = true return v.Parent.Parent, true end end end return "Failed", false end local LanesPer, success = getLanesBall() -- Conversion factor: 1 mile per hour is approximately 14.67 studs per second local speedStudsPerSecond = BallSpeedMPH * 14.67 if success == true then if LanesPer:FindFirstChild("Ball") then for i,v in pairs(LanesPer:WaitForChild("Ball"):GetChildren()) do if v:IsA("BodyVelocity") and v.Name == "BodyVelocity" then v:Destroy() end end if LanesPer:WaitForChild("Ball").Position.Z < -115 then for i = 1,10 do if LanesPer.Pins:FindFirstChild("Pin".. i) then local part = LanesPer:WaitForChild("Ball") local targetPart = LanesPer.Pins:WaitForChild("Pin".. i).PinMesh --|-118.24695587158203 if targetPart.Position.Z > -124 and targetPart.Position.Z < -115 and targetPart.Position.Y > 5.400 and targetPart.Position.Y < 6 then -- Calculate the direction and distance to the target (ignoring the Y axis) local direction = (targetPart.Position - part.Position) direction = Vector3.new(direction.X, 0, direction.Z) local distance = direction.Magnitude direction = direction.Unit -- Create a BodyVelocity object local bodyVelocity = Instance.new("BodyVelocity") bodyVelocity.Velocity = direction * speedStudsPerSecond bodyVelocity.MaxForce = Vector3.new(math.huge, 0, math.huge) bodyVelocity.Parent = part -- Calculate the travel time local travelTime = distance / speedStudsPerSecond -- Function to stop the block after moving the specified distance local function stopAtTarget() wait(travelTime) bodyVelocity:Destroy() end -- Start moving the block stopAtTarget() else print("nope") end end end local newborn = LanesPer:WaitForChild("Ball") local lololol = Instance.new("BodyVelocity") lololol.Velocity = Vector3.new(0, 0, -10) lololol.MaxForce = Vector3.new(0, 0, math.huge) lololol.Parent = newborn end end end end end) if not success then print("Error in ball coroutine: ".. tostring(result)) end task.wait(0.1) end end) coroutine.resume(ball) local function onKeyPress(mobile, input) if mode ~= "Normal" then return nil end if not mobile and input.KeyCode == keybind and EnabledAuto == true then if debug_.Enabled == true then local LanesPer = getLanes() local yes = { "-------==AutoStrike==--------", "Wait time : ".. waittime, "Keybind : ".. Keybind_ } for _, message in ipairs(yes) do print(" " .. message) end --print("Why tho") --pairs(LanesPer.Pins:GetChildren()) for i = 1,10 do if LanesPer.Pins:FindFirstChild("Pin".. i) then local rightpath = LanesPer.Pins:FindFirstChild("Pin".. i) local highlight = Instance.new("Highlight") highlight.Parent = rightpath.PinMesh local bodyAngularVelocity = Instance.new("BodyAngularVelocity") local bodyVelocity = Instance.new("BodyVelocity") if BodyVelocityonfalse == true then bodyVelocity.MaxForce = Vector3.new(10000000, 0, 10000000) bodyVelocity.Velocity = Vector3.new(debug_.Velocity.X, debug_.Velocity.Y, debug_.Velocity.Z) bodyVelocity.Parent = rightpath.Base end bodyAngularVelocity.AngularVelocity = Vector3.new(debug_.AngularV.X, debug_.AngularV.Y, debug_.AngularV.Z) bodyAngularVelocity.MaxTorque = Vector3.new(100000, 100000, 100000) bodyAngularVelocity.P = 1000 bodyAngularVelocity.Parent = rightpath.Base task.wait(waittime) bodyAngularVelocity:Destroy() bodyVelocity:Destroy() highlight:Destroy() end end else local LanesPer = getLanes() local yes = { "-------==AutoStrike==--------", "Wait time : ".. waittime, "Keybind : ".. Keybind_ } for _, message in ipairs(yes) do print(" " .. message) end --print("Why tho") for i,v in pairs(LanesPer.Pins:GetChildren()) do if LanesPer.Pins:FindFirstChild("Pin".. i) then local rightpath = LanesPer.Pins:FindFirstChild("Pin".. i) local highlight = Instance.new("Highlight") highlight.Parent = v.Base local bodyAngularVelocity = Instance.new("BodyAngularVelocity") local bodyVelocity = Instance.new("BodyVelocity") if BodyVelocityonfalse == true then bodyVelocity.MaxForce = Vector3.new(10000000, 0, 10000000) bodyVelocity.Velocity = Vector3.new(-10, 0, 0) bodyVelocity.Parent = rightpath.Base end bodyAngularVelocity.AngularVelocity = Vector3.new(0, 0, 10) bodyAngularVelocity.MaxTorque = Vector3.new(100000, 100000, 100000) bodyAngularVelocity.P = 1000 bodyAngularVelocity.Parent = v.Base task.wait(waittime) bodyAngularVelocity:Destroy() bodyVelocity:Destroy() highlight:Destroy() end end end elseif mobile and EnabledAuto == true then if debug_.Enabled == true then local LanesPer = getLanes() local yes = { "-------==AutoStrike==--------", "Wait time : ".. waittime, "Keybind : ".. Keybind_ } for _, message in ipairs(yes) do print(" " .. message) end --print("Why tho") --pairs(LanesPer.Pins:GetChildren()) for i = 1,10 do if LanesPer.Pins:FindFirstChild("Pin".. i) then local rightpath = LanesPer.Pins:FindFirstChild("Pin".. i) local highlight = Instance.new("Highlight") highlight.Parent = rightpath.PinMesh local bodyAngularVelocity = Instance.new("BodyAngularVelocity") local bodyVelocity = Instance.new("BodyVelocity") if BodyVelocityonfalse == true then bodyVelocity.MaxForce = Vector3.new(10000000, 0, 10000000) bodyVelocity.Velocity = Vector3.new(debug_.Velocity.X, debug_.Velocity.Y, debug_.Velocity.Z) bodyVelocity.Parent = rightpath.Base end bodyAngularVelocity.AngularVelocity = Vector3.new(debug_.AngularV.X, debug_.AngularV.Y, debug_.AngularV.Z) bodyAngularVelocity.MaxTorque = Vector3.new(100000, 100000, 100000) bodyAngularVelocity.P = 1000 bodyAngularVelocity.Parent = rightpath.Base task.wait(waittime) bodyAngularVelocity:Destroy() bodyVelocity:Destroy() highlight:Destroy() end end else local LanesPer = getLanes() local yes = { "-------==AutoStrike==--------", "Wait time : ".. waittime, "Keybind : ".. Keybind_ } for _, message in ipairs(yes) do print(" " .. message) end --print("Why tho") for i,v in pairs(LanesPer.Pins:GetChildren()) do if LanesPer.Pins:FindFirstChild("Pin".. i) then local rightpath = LanesPer.Pins:FindFirstChild("Pin".. i) local highlight = Instance.new("Highlight") highlight.Parent = v.Base local bodyAngularVelocity = Instance.new("BodyAngularVelocity") local bodyVelocity = Instance.new("BodyVelocity") if BodyVelocityonfalse == true then bodyVelocity.MaxForce = Vector3.new(10000000, 0, 10000000) bodyVelocity.Velocity = Vector3.new(-10, 0, 0) bodyVelocity.Parent = rightpath.Base end bodyAngularVelocity.AngularVelocity = Vector3.new(0, 0, 10) bodyAngularVelocity.MaxTorque = Vector3.new(100000, 100000, 100000) bodyAngularVelocity.P = 1000 bodyAngularVelocity.Parent = v.Base task.wait(waittime) bodyAngularVelocity:Destroy() bodyVelocity:Destroy() highlight:Destroy() end end end end end game:GetService("UserInputService").InputBegan:Connect(function(key) local keybinduserinputservice = key onKeyPress(false, keybinduserinputservice) end) local ButtonStrike = main:CreateButton({ Name = "Strike! (For mobile)", Callback = function() onKeyPress(true, "K") end, }) local Credits = Window:CreateTab("Credits", 4483362458) -- Title, Image local creditssec = Credits:CreateSection("Credits") local Creditst = Credits:CreateLabel("Powered By RayField", 4483362458, Color3.fromRGB(255, 255, 255), false) -- Title, Icon, Color, IgnoreTheme local Creditstf = Credits:CreateLabel("Owner | Scripter | lzoda(Discord) | ", 4483362458, Color3.fromRGB(255, 255, 255), false) -- Title, Icon, Color, IgnoreTheme