if game.GameId == 6325068386 then

local TweenService = game:GetService("TweenService")
local VirtualInputManager = game:GetService("VirtualInputManager") -- For Auto Goalie
local Rayfield = loadstring(game:HttpGet('https://[Log in to view URL]'))()
local Window = Rayfield:CreateWindow({
   Name = "Blue Lock Rivals Hub Made by norizznohadlove",
   Icon = 0,
   LoadingTitle = "Blue Lock Now Loading...",
   LoadingSubtitle = "by norizznohadlove",
   Theme = "Default",
   DisableRayfieldPrompts = false,
   DisableBuildWarnings = false,
   ConfigurationSaving = {
      Enabled = true,
      FolderName = nil,
      FileName = "Blue Lock Rivals Hub"
   },
   Discord = {
      Enabled = false,
      Invite = "noinvitelink",
      RememberJoins = true
   },
   KeySystem = true,
   KeySettings = {
      Title = "Untitled",
      Subtitle = "Key System",
      Note = "No method of obtaining the key is provided",
      FileName = "Key",
      SaveKey = true,
      GrabKeyFromSite = false,
      Key = {"BestScriptHub"}
   }
})

local Tab = Window:CreateTab("Main Features", 0)
local AnkleBreakerTab = Window:CreateTab("Ankle Breaker", 0)
local GoalieTab = Window:CreateTab("Goalie", 0)
local PlayerTab = Window:CreateTab("Player Features", 0)

local AutoRollTab = Window:CreateTab("Auto Roll", 0)

-- Toggles and Variables
local autoBallEnabled = false
local ballMagnetEnabled = false
local autoGoalEnabled = false
local walkspeedEnabled = false
local infiniteSpinsEnabled = false
local infiniteStaminaEnabled = false
local autoAnkleBreakerEnabled = false
local antiRagdollEnabled = false
local autoGoalieEnabled = false

local rolldelay = 0
local ankleBreakerDistance = 15
local player = game:GetService("Players").LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local ballService = game:GetService("ReplicatedStorage").Packages.Knit.Services.BallService.RE
local defaultWalkspeed = 16
local walkspeedValue = defaultWalkspeed
local autoRollEnabled = false
local selectedStyle = "Isagi" -- Default style option

player.CharacterAdded:Connect(function(newCharacter)
    character = newCharacter
end)

local function tweenToPosition(targetPosition, duration, callback)
    if character and character:FindFirstChild("HumanoidRootPart") then
        local humanoidRootPart = character.HumanoidRootPart
        local tweenInfo = TweenInfo.new(duration, Enum.EasingStyle.Linear, Enum.EasingDirection.Out)
        local goal = {CFrame = targetPosition}
        local tween = TweenService:Create(humanoidRootPart, tweenInfo, goal)
        tween:Play()

        tween.Completed:Connect(function()
            if callback then
                callback()
            end
        end)
    end
end

local function autoGoalLoop()
    while autoGoalEnabled do
        wait(0)
        for _, myModel in pairs(workspace:GetChildren()) do
            if myModel:IsA("Model") and myModel.Name == player.Name then
                local football = myModel:FindFirstChild("Football")
                if football then
                    local playerTeam = player.Team
                    if playerTeam then
                        if playerTeam.Name == "Home" then
                            local homeGK = workspace.Goals:FindFirstChild("HomeGK")
                            if homeGK then
                                local targetPosition = homeGK.CFrame + homeGK.CFrame.LookVector * 7 + Vector3.new(0, 7, 0)

                                tweenToPosition(targetPosition, 1, function()
                                    tweenToPosition(homeGK.CFrame, 1, function()
                                        local args = {
                                            [1] = 110,
                                            [4] = Vector3.new(0.9807752370834351, 0.11680954694747925, -0.15631836652755737)
                                        }
                                        ballService.Shoot:FireServer(unpack(args))
                                    end)
                                end)
                            end
                        elseif playerTeam.Name == "Away" then
                            local awayGK = workspace.Goals:FindFirstChild("AwayGK")
                            if awayGK then
                                local targetPosition = awayGK.CFrame + awayGK.CFrame.LookVector * 7 + Vector3.new(0, 7, 0)

                                tweenToPosition(targetPosition, 1, function()
                                    tweenToPosition(awayGK.CFrame, 1, function()
                                        local args = {
                                            [1] = 110,
                                            [4] = Vector3.new(0.9807752370834351, 0.11680954694747925, -0.15631836652755737)
                                        }
                                        ballService.Shoot:FireServer(unpack(args))
                                    end)
                                end)
                            end
                        end
                    end
                end
            end
        end
    end
end

local function calculateDynamicRange(velocity)
    local baseRange = 25 -- Starting range
    local rangeMultiplier = 0.5 -- Adjust this multiplier to control how quickly range increases with speed
    local additionalRange = velocity.Magnitude * rangeMultiplier
    return baseRange + additionalRange
end

local function teleportToBall(football)
    local humanoidRootPart = character:FindFirstChild("HumanoidRootPart")
    if humanoidRootPart then
        humanoidRootPart.CFrame = CFrame.new(football.Position)
    end
end

local function autoGoalieLoop()
    while autoGoalieEnabled do
        wait(0.1)
        local football = workspace:FindFirstChild("Football")
        if football and character:FindFirstChild("HumanoidRootPart") and character:FindFirstChild("Humanoid") then
            local humanoidRootPart = character.HumanoidRootPart
            local humanoid = character.Humanoid
            local goaliePosition = humanoidRootPart.Position
            local footballPosition = football.Position
            local footballVelocity = football.AssemblyLinearVelocity -- Get the ball's velocity
            local dynamicRange = calculateDynamicRange(footballVelocity)
            local distance = (goaliePosition - footballPosition).Magnitude

            if distance <= dynamicRange then
                humanoid.AutoRotate = false -- Disable Auto Rotate
                local directionToBall = (footballPosition - goaliePosition).unit
                humanoidRootPart.CFrame = CFrame.lookAt(goaliePosition, goaliePosition + directionToBall) -- Rotate to face ball

                -- Perform goalie actions
                VirtualInputManager:SendKeyEvent(true, Enum.KeyCode.A, false, nil) -- Hold "A"
                wait(0.1)
                VirtualInputManager:SendKeyEvent(true, Enum.KeyCode.Q, false, nil) -- Press "Q"
                wait(0.1)
                VirtualInputManager:SendKeyEvent(false, Enum.KeyCode.A, false, nil) -- Release "A"
                VirtualInputManager:SendKeyEvent(false, Enum.KeyCode.Q, false, nil) -- Release "Q"

                -- Teleport towards the ball until it's out of range or no longer in the workspace
                while football and (football.Position - humanoidRootPart.Position).Magnitude <= dynamicRange do
                    teleportToBall(football)
                    wait(0.1)
                end
            else
                humanoid.AutoRotate = true -- Re-enable Auto Rotate
            end
        else
            if character:FindFirstChild("Humanoid") then
                character.Humanoid.AutoRotate = true -- Ensure Auto Rotate is re-enabled
            end
        end
    end
end

local function infiniteSpinsLoop()
    while infiniteSpinsEnabled do
        wait(0)
        player.ProfileStats.Spins.Value = math.huge
    end
end

local function infiniteStaminaLoop()
    while infiniteStaminaEnabled do
        wait(0)
        player.PlayerStats.Stamina.Value = math.huge
    end
end

local function autoBallLoop()
    while autoBallEnabled do
        wait(0)
        for _, v in pairs(workspace:GetChildren()) do
            if v:IsA("Model") and v.Name ~= "GK" and v.Name ~= "GK2" then
                local football = v:FindFirstChild("Football")
                local values = v:FindFirstChild("Values")
                local isGoalie = values and values:FindFirstChild("Goalie") and values.Goalie.Value == true

                if isGoalie then
                    continue
                end

                if football then
                    local ballPlayer = game:GetService("Players"):GetPlayerFromCharacter(v)
                    if ballPlayer and ballPlayer.Team ~= player.Team then
                        local humanoidRootPart = character:FindFirstChild("HumanoidRootPart")
                        if humanoidRootPart then
                            local originalY = humanoidRootPart.Position.Y
                            humanoidRootPart.CFrame = CFrame.new(football.Position.X, originalY, football.Position.Z)
                            ballService.Slide:FireServer()
                        end
                    end
                end
            end
        end
    end
end

local RunService = game:GetService("RunService")

local function ballMagnetLoop()
    local lastTouchTime = 0  -- Track the time when we last fired the touch events

    while ballMagnetEnabled do
        task.wait(0.1)  -- Wait to prevent overloading the loop

        local football = workspace:FindFirstChild("Football")
        if football then
            local hitbox = football:FindFirstChild("Hitbox")
            if hitbox and hitbox:FindFirstChild("TouchInterest") then
                local humanoidRootPart = character:FindFirstChild("HumanoidRootPart")
                if humanoidRootPart then
                    -- Set Football's position to the HumanoidRootPart's position
                    football.CFrame = humanoidRootPart.CFrame

                    -- Fire touch event on Hitbox.TouchInterest, simulating the player's touch interaction
                    if tick() - lastTouchTime > 0.5 then
                        local touchInterest = hitbox.TouchInterest
                        
                        -- Simulate the touch events with firetouchinterest
                        firetouchinterest(humanoidRootPart, touchInterest, 0)  -- Start touch
                        firetouchinterest(humanoidRootPart, touchInterest, 1)  -- End touch
                        
                        lastTouchTime = tick()  -- Update the last touch time
                    end
                end
            end
        end
    end
end

local function autoAnkleBreakerLoop()
    while autoAnkleBreakerEnabled do
        wait(0)
        for _, v in pairs(workspace:GetChildren()) do
            if v:IsA("Model") and v.Name ~= player.Name then
                local values = v:FindFirstChild("Values")
                if values and values:FindFirstChild("Sliding") then
                    local slidingValue = values.Sliding.Value
                    local humanoidRootPart = v:FindFirstChild("HumanoidRootPart")
                    if humanoidRootPart and (humanoidRootPart.Position - character.HumanoidRootPart.Position).Magnitude <= ankleBreakerDistance and slidingValue == true then
                        game:GetService("ReplicatedStorage").Packages.Knit.Services.BallService.RE.Dribble:FireServer()
                    end
                end
            end
        end
    end
end

local function antiRagdollLoop()
    local plrname = game.Players.LocalPlayer.Name
    while antiRagdollEnabled do
        wait(0.1)
        for _, v in pairs(workspace:GetChildren()) do
            if v.Name == plrname and v:FindFirstChild("Values") then
                if v.Values.Stunned.Value == true then
                    v.Values.Stunned.Value = false
                end
                if v:FindFirstChild("IsRagdoll") and v.IsRagdoll.Value == true then
                    v.IsRagdoll.Value = false
                end
            end
        end
    end
end

AnkleBreakerTab:CreateToggle({
    Name = "Auto Ankle Breaker",
    CurrentValue = false,
    Flag = "AutoAnkleBreaker",
    Callback = function(value)
        autoAnkleBreakerEnabled = value
        if autoAnkleBreakerEnabled then
            autoAnkleBreakerLoop()
        end
    end
})

AnkleBreakerTab:CreateSlider({
    Name = "Ankle Breaker Distance",
    Range = {1, 25},
    Increment = 1,
    Suffix = "Distance",
    CurrentValue = ankleBreakerDistance,
    Flag = "AnkleBreakerDistanceSlider",
    Callback = function(value)
        ankleBreakerDistance = value
    end
})

Tab:CreateToggle({
    Name = "Auto Ball Possession",
    CurrentValue = false,
    Flag = "AutoBall",
    Callback = function(value)
        autoBallEnabled = value
        if autoBallEnabled then
            autoBallLoop()
        end
    end
})

Tab:CreateToggle({
    Name = "Auto Goal",
    CurrentValue = false,
    Flag = "AutoGoal",
    Callback = function(value)
        autoGoalEnabled = value
        if autoGoalEnabled then
            autoGoalLoop()
        end
    end
})

PlayerTab:CreateToggle({
    Name = "Walkspeed",
    CurrentValue = false,
    Flag = "Walkspeed",
    Callback = function(value)
        walkspeedEnabled = value
        while walkspeedEnabled do
            wait(0)
            if character and character:FindFirstChild("Humanoid") then
                character.Humanoid.WalkSpeed = walkspeedValue
            end
        end
        if character and character:FindFirstChild("Humanoid") then
            character.Humanoid.WalkSpeed = defaultWalkspeed
        end
    end
})

PlayerTab:CreateSlider({
    Name = "Walkspeed Value",
    Range = {16, 100},
    Increment = 1,
    Suffix = "Speed",
    CurrentValue = walkspeedValue,
    Flag = "WalkspeedSlider",
    Callback = function(value)
        walkspeedValue = value
    end
})

PlayerTab:CreateToggle({
    Name = "Infinite Spins",
    CurrentValue = false,
    Flag = "InfiniteSpins",
    Callback = function(value)
        infiniteSpinsEnabled = value
        if infiniteSpinsEnabled then
            infiniteSpinsLoop()
        end
    end
})

PlayerTab:CreateToggle({
    Name = "Infinite Stamina",
    CurrentValue = false,
    Flag = "InfiniteStamina",
    Callback = function(value)
        infiniteStaminaEnabled = value
        if infiniteStaminaEnabled then
            infiniteStaminaLoop()
        end
    end
})

Tab:CreateToggle({
    Name = "Ball Magnet",
    CurrentValue = false,
    Flag = "BallMagnet",
    Callback = function(value)
        ballMagnetEnabled = value
        if ballMagnetEnabled then
            ballMagnetLoop()
        end
    end
})

Tab:CreateToggle({
    Name = "Anti Ragdoll",
    CurrentValue = false,
    Flag = "AntiRagdoll",
    Callback = function(value)
        antiRagdollEnabled = value
        if antiRagdollEnabled then
            antiRagdollLoop()
        end
    end
})

-- Create a text box to input the desired style
local Input = AutoRollTab:CreateInput({
    Name = "Enter Desired Style",
    CurrentValue = selectedStyle,
    PlaceholderText = "Type style here...",
    RemoveTextAfterFocusLost = false,
    Flag = "StyleTextBox",
    Callback = function(text)
        selectedStyle = text  -- Update the selectedStyle when the user types in the text box
    end
})

-- Function to perform auto-roll
local function autoRollLoop()
    local player = game:GetService("Players").LocalPlayer
    local styleStats = player.PlayerStats.Style
    local targetStyle = selectedStyle

    -- Start a loop to continuously check and roll
    while autoRollEnabled do
        -- Check if the style matches the selected one, and stop the loop if so
        if styleStats.Value == targetStyle then
            -- Show a notification
            Rayfield:Notify({
                Title = "Auto Roll",
                Content = "Successfully rolled into " .. targetStyle .. "!",
                Duration = 5,
                Image = nil,
            })
            
            -- Stop the loop once the style matches
            autoRollEnabled = false
            break
        end
        
        -- Fire the remote to roll
        game:GetService("ReplicatedStorage").Packages.Knit.Services.StyleService.RE.Spin:FireServer()

        -- Wait for a second before checking again to avoid server spam
        wait(rolldelay)
    end
end

-- Create a toggle for enabling/disabling auto roll
local Toggle = AutoRollTab:CreateToggle({
    Name = "Auto Roll",
    CurrentValue = autoRollEnabled,
    Flag = "AutoRollToggle",
    Callback = function(value)
        autoRollEnabled = value
        if autoRollEnabled then
            -- Start the loop when toggled on
            autoRollLoop()
        else
            -- Stop the loop if toggled off
            autoRollEnabled = false
        end
    end
})

local Slider = AutoRollTab:CreateSlider({
   Name = "Roll delay",
   Range = {0, 2},
   Increment = 0.1,
   Suffix = "Delay",
   CurrentValue = 10,
   Flag = "Slider1",
   Callback = function(rolldelayvalue)
 rolldelay = rolldelayvalue
   end,
})

end

           

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: