Further enhance, and add more ANTI-slap features:

```
-- Enhanced Roblox Script with Advanced Dynamic Slap Blocking System and Toggle Feature

-- Services
local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local RunService = game:GetService("RunService")
local VirtualInputManager = game:GetService("VirtualInputManager")
local TweenService = game:GetService("TweenService")
local UserInputService = game:GetService("UserInputService")
local ContextActionService = game:GetService("ContextActionService")

-- Remotes
local LightsaberRemotes = ReplicatedStorage:WaitForChild("LightsaberRemotes")
local BlockRemote = LightsaberRemotes:WaitForChild("Block")
local UnblockRemote = LightsaberRemotes:WaitForChild("Unblock")

-- Settings
local Settings = {
    BlockDistance = 15,
    AutoCounterEnabled = false,
    AutoSlapDistance = 10,
    ReactionTimeThreshold = 0.15, -- Base reaction time
    BlockDuration = 0.3,
    Cooldown = 1.0,
    SlapAnimations = {
        ["Slap"] = 12625891544,
        ["SlappedLegs"] = 12671715182,
        ["SlappedArms"] = 12625896358,
        ["RightSwing"] = 12625891545,
        ["LeftSwing"] = 12625891546,
        ["OverheadSwing"] = 12625891547,
        ["DoubleSlap"] = 12625891548
    }
}

-- State Management
local blockingPlayers = {}
local isBlockingEnabled = true
local lastBlockTime = 0

-- GUI Setup for Visual Feedback
local function setupGUI()
    local screenGui = Instance.new("ScreenGui")
    screenGui.Name = "AdvancedAntiSlapIndicator"
    screenGui.ResetOnSpawn = false
    screenGui.Parent = Players.LocalPlayer:WaitForChild("PlayerGui")
    
    local blockIndicator = Instance.new("Frame")
    blockIndicator.Size = UDim2.new(0, 250, 0, 120)
    blockIndicator.Position = UDim2.new(0.5, -125, 0, 10)
    blockIndicator.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
    blockIndicator.BackgroundTransparency = 0.5
    blockIndicator.BorderSizePixel = 0
    blockIndicator.Visible = false
    blockIndicator.Parent = screenGui
    
    local blockText = Instance.new("TextLabel")
    blockText.Size = UDim2.new(1, 0, 1, 0)
    blockText.BackgroundTransparency = 1
    blockText.Text = "Blocking System:\nEnabled\nAgainst: None"
    blockText.TextColor3 = Color3.fromRGB(255, 255, 255)
    blockText.TextScaled = true
    blockText.TextWrapped = true
    blockText.Parent = blockIndicator
    
    local toggleIndicator = Instance.new("Frame")
    toggleIndicator.Size = UDim2.new(0, 200, 0, 50)
    toggleIndicator.Position = UDim2.new(0.5, -100, 0, 140)
    toggleIndicator.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
    toggleIndicator.BackgroundTransparency = 0.5
    toggleIndicator.BorderSizePixel = 0
    toggleIndicator.Visible = false
    toggleIndicator.Parent = screenGui
    
    local toggleText = Instance.new("TextLabel")
    toggleText.Size = UDim2.new(1, 0, 1, 0)
    toggleText.BackgroundTransparency = 1
    toggleText.Text = "Blocking System Disabled"
    toggleText.TextColor3 = Color3.fromRGB(255, 0, 0)
    toggleText.TextScaled = true
    toggleText.TextWrapped = true
    toggleText.Parent = toggleIndicator
    
    return blockIndicator, blockText, toggleIndicator, toggleText
end

local blockIndicator, blockText, toggleIndicator, toggleText = setupGUI()

-- Tween Setup
local tweenInfoVisible = TweenInfo.new(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out)
local tweenInfoHidden = TweenInfo.new(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.In)

local showTween = TweenService:Create(blockIndicator, tweenInfoVisible, {BackgroundTransparency = 0.3, Visible = true})
local hideTween = TweenService:Create(blockIndicator, tweenInfoHidden, {BackgroundTransparency = 0.5, Visible = false})

local toggleShowTween = TweenService:Create(toggleIndicator, tweenInfoVisible, {BackgroundTransparency = 0.3, Visible = true})
local toggleHideTween = TweenService:Create(toggleIndicator, tweenInfoHidden, {BackgroundTransparency = 0.5, Visible = false})

-- Utility Functions
local function getCurrentTime()
    return tick()
end

local function getClosestPlayers()
    local players = {}
    local localPlayer = Players.LocalPlayer
    local localCharacter = localPlayer.Character

    if localCharacter and localCharacter:FindFirstChild("HumanoidRootPart") then
        local localPosition = localCharacter.HumanoidRootPart.Position

        for _, player in ipairs(Players:GetPlayers()) do
            if player ~= localPlayer and player.Character and player.Character:FindFirstChild("HumanoidRootPart") then
                local playerPosition = player.Character.HumanoidRootPart.Position
                local distance = (playerPosition - localPosition).Magnitude

                if distance <= Settings.BlockDistance then
                    table.insert(players, {Player = player, Distance = distance})
                end
            end
        end
    end

    table.sort(players, function(a, b) return a.Distance < b.Distance end)
    return players
end

local function updateGUI()
    local blockingNames = {}
    for opponentName, _ in pairs(blockingPlayers) do
        table.insert(blockingNames, opponentName)
    end
    
    if isBlockingEnabled and #blockingNames > 0 then
        blockIndicator.Visible = true
        blockText.Text = "Blocking System:\nEnabled\nAgainst:\n" .. table.concat(blockingNames, ", ")
        showTween:Play()
    else
        hideTween:Play()
        blockText.Text = "Blocking against:\nNone"
    end
end

local function toggleBlockingSystem()
    isBlockingEnabled = not isBlockingEnabled
    if isBlockingEnabled then
        toggleIndicator.Visible = false
        toggleHideTween:Play()
        print("Blocking System Enabled")
    else
        toggleIndicator.Visible = true
        toggleShowTween:Play()
        blockingPlayers = {}
        UnblockRemote:FireServer()
        print("Blocking System Disabled")
    end
    updateGUI()
end

-- Enhanced Slap Animation Handling
local function handleSlapAnimation(opponent, animTrack)
    if not isBlockingEnabled then return end

    local localPlayer = Players.LocalPlayer
    local character = localPlayer.Character
    if not character or not character:FindFirstChild("HumanoidRootPart") then return end

    local opponentRoot = opponent.Character:FindFirstChild("HumanoidRootPart")
    if not opponentRoot then return end

    local distance = (character.HumanoidRootPart.Position - opponentRoot.Position).Magnitude

    if distance > Settings.BlockDistance then return end

    local currentTime = getCurrentTime()
    local timeSinceLastBlock = currentTime - lastBlockTime

    if timeSinceLastBlock < Settings.Cooldown then
        print("Block on cooldown. Time left:", string.format("%.2f", Settings.Cooldown - timeSinceLastBlock))
        return
    end

    local dynamicReactionTime = Settings.ReactionTimeThreshold * (Settings.BlockDistance / distance)
    dynamicReactionTime = math.clamp(dynamicReactionTime, 0.05, Settings.ReactionTimeThreshold)

    local shouldBlock = false
    local reactiveAnims = {"Slap", "RightSwing", "LeftSwing", "OverheadSwing", "DoubleSlap"}

    for _, animName in ipairs(reactiveAnims) do
        if animTrack.Animation.AnimationId == "rbxassetid://" .. Settings.SlapAnimations[animName] then
            shouldBlock = true
            break
        end
    end

    if shouldBlock then
        blockingPlayers[opponent.Name] = currentTime
        lastBlockTime = currentTime
        BlockRemote:FireServer()
        print("Blocking initiated against:", opponent.Name)

        updateGUI()

        task.delay(Settings.BlockDuration, function()
            UnblockRemote:FireServer()
            blockingPlayers[opponent.Name] = nil
            print("Blocking ended for:", opponent.Name)
            updateGUI()
        end)

        if Settings.AutoCounterEnabled and distance <= Settings.AutoSlapDistance then
            task.delay(dynamicReactionTime, function()
                VirtualInputManager:SendKeyEvent(true, Enum.KeyCode.E, false, game)
                task.wait(0.1)
                VirtualInputManager:SendKeyEvent(false, Enum.KeyCode.E, false, game)
                print("Automatic counter-slap performed against:", opponent.Name)
            end)
        end
    end
end

-- Setup Functions
local function onOpponentAnimationPlayed(opponent, animTrack)
    for animName, animId in pairs(Settings.SlapAnimations) do
        if animTrack.Animation and animTrack.Animation.AnimationId == "rbxassetid://" .. animId then
            print("Detected slap animation:", animName, "from:", opponent.Name)
            handleSlapAnimation(opponent, animTrack)
            break
        end
    end
end

local function onCharacterAdded(character, player)
    local humanoid = character:WaitForChild("Humanoid")
    humanoid.AnimationPlayed:Connect(function(animTrack)
        onOpponentAnimationPlayed(player, animTrack)
    end)
end

local function setupPlayer(player)
    if player == Players.LocalPlayer then return end
    if player.Character then
        onCharacterAdded(player.Character, player)
    end
    player.CharacterAdded:Connect(function(character)
        onCharacterAdded(character, player)
    end)
end

-- Initialize
for _, player in ipairs(Players:GetPlayers()) do
    setupPlayer(player)
end

Players.PlayerAdded:Connect(setupPlayer)

-- Key Binding
ContextActionService:BindAction("ToggleBlockingSystem", function(_, state)
    if state == Enum.UserInputState.Begin then
        toggleBlockingSystem()
    end
end, false, Enum.KeyCode.R)

-- Initial GUI Update
updateGUI()

-- Display Instructions
print("Advanced Dynamic Slap Blocking System Initialized.")
print("Press 'R' to toggle the blocking system on and off.")

-- Main Loop for Continuous Updates
RunService.Heartbeat:Connect(function()
    if isBlockingEnabled then
        local closestPlayers = getClosestPlayers()
        for _, playerInfo in ipairs(closestPlayers) do
            local player = playerInfo.Player
            if not blockingPlayers[player.Name] then
                handleSlapAnimation(player, {Animation = {AnimationId = ""}})
            end
        end
    end
end)