--[[ Script: Duels Warriors PC Script - Final Ultimate Version Version: 117.0 (GUI Toggle Enhanced Debugging) Author: [Your Name] Game: Duels Warriors (Roblox) Description: Enhanced debugging for the GUI toggle key. Features: GUI Toggle Key (FIXED), Intelligent Auto Parry, Speed Logic, Executor Mouse/Key Input, Rayfield v2 GUI Executor: Synapse X, Script-Ware, Fluxus, etc. (Requires input simulation functions) ]] -- --- Core Services --- local Players = game:GetService("Players") local ReplicatedStorage = game:GetService("ReplicatedStorage") local RunService = game:GetService("RunService") local UserInputService = game:GetService("UserInputService") local LocalPlayer = Players.LocalPlayer local Workspace = game:GetService("Workspace") local VirtualUser = game:GetService("VirtualUser") -- --- Script Configuration --- local Config = { -- Auto Parry Settings AutoParryEnabled = false, AutoParryDelay = 0.05, ParryDistance = 15, -- Speed Settings SpeedEnabled = false, CustomSpeedValue = 100, SpeedKey = Enum.KeyCode.C, -- Bypass AntiCheatBypass = true, -- GUI Toggle GuiToggleKey = Enum.KeyCode.RightShift, -- GUI toggle key (Default: Right SHIFT) } -- --- Player & Character Variables --- local Character, Humanoid, RootPart, OriginalWalkSpeed = nil, nil, nil, 16 local IsPlayerLoaded = false -- --- GUI Variable (Global for toggle) --- local gui_screen_gui = nil -- --- Character Setup Function --- local function setupCharacter() Character = LocalPlayer.Character if not Character then print("[SETUP] Waiting for character...") LocalPlayer.CharacterAdded:Wait() Character = LocalPlayer.Character end Humanoid = Character:WaitForChild("Humanoid", 10) RootPart = Character:WaitForChild("HumanoidRootPart", 10) if Humanoid and RootPart then OriginalWalkSpeed = Humanoid.WalkSpeed IsPlayerLoaded = true end print("[SCRIPT] Character loaded: " .. LocalPlayer.Name) end setupCharacter() LocalPlayer.CharacterAdded:Connect(setupCharacter) -- --- Bypass Logic --- local function applyBypass() if not Config.AntiCheatBypass then return end print("[BYPASS] Advanced Bypass enabled.") local function disableAnticheat(instance) if instance:IsA("LocalScript") and instance.Name:lower():find("anticheat") then instance.Disabled = true warn("[BYPASS] Anticheat script disabled: " .. instance.Name) end end for _, obj in ipairs(game:GetDescendants()) do disableAnticheat(obj) end game.DescendantAdded:Connect(disableAnticheat) pcall(function() local playerGui = LocalPlayer:WaitForChild("PlayerGui", 5) if playerGui and getgenv().syn and syn.protect_gui then syn.protect_gui(playerGui) print("[BYPASS] GUI protection enabled.") end end) end -- --- Aggressive Input Functions with Debugging --- local function mouse_click() pcall(function() if mouse1click then mouse1click() print("[INPUT SIM] Attempted click with 'mouse1click'.") elseif mousemoverel and mouse1down and mouse1up then mousemoverel(0,0) mouse1down() task.wait(0.01) mouse1up() print("[INPUT SIM] Attempted click with 'mousemoverel'.") else local viewportSize = game.Workspace.CurrentCamera.ViewportSize local mousePosition = Vector2.new(viewportSize.X / 2, viewportSize.Y / 2) VirtualUser:Capture() VirtualUser:MouseDown(mousePosition, Enum.UserInputType.MouseButton1) task.wait(0.01) VirtualUser:MouseUp(mousePosition, Enum.UserInputType.MouseButton1) VirtualUser:Release() warn("[INPUT SIM] Attempted click with VirtualUser (Backup).") end end) end -- --- INTELLIGENT AUTO PARRY LOGIC --- local lastParryTick = 0 local function handleAutoParry() if not Config.AutoParryEnabled or not IsPlayerLoaded then return end local closest_enemy = nil local min_dist = Config.ParryDistance local enemy_humanoid = nil local enemy_animator = nil for _, player in ipairs(Players:GetPlayers()) do if player ~= LocalPlayer and player.Character and player.Character:FindFirstChild("Humanoid") and player.Character:FindFirstChild("HumanoidRootPart") then local distance = (RootPart.Position - player.Character.HumanoidRootPart.Position).Magnitude if distance < min_dist then min_dist = distance closest_enemy = player.Character enemy_humanoid = player.Character:FindFirstChild("Humanoid") enemy_animator = enemy_humanoid:FindFirstChild("Animator") end end end if closest_enemy and enemy_humanoid and enemy_animator then local is_attacking = false local playing_tracks = enemy_animator:GetPlayingAnimationTracks() for _, track in ipairs(playing_tracks) do local anim_name = track.Name:lower() if anim_name:find("attack") or anim_name:find("slash") or anim_name:find("swing") or anim_name:find("combo") or anim_name:find("skill") then is_attacking = true print("[AUTO PARRY] Attack animation detected!") break end end if not is_attacking then if enemy_humanoid.MoveDirection.Magnitude > 0.1 or enemy_humanoid.Health < enemy_humanoid.MaxHealth then is_attacking = true end end if is_attacking then print("[AUTO PARRY] Enemy is attacking! Attempting AGGRESSIVE parry (Animation Detection).") mouse_click() return true end end return false end -- --- RESTORED Speed Logic --- local speedConnection = nil local function forceSpeed() if speedConnection then speedConnection:Disconnect() end if Config.SpeedEnabled then speedConnection = RunService.RenderStepped:Connect(function() if Humanoid then Humanoid.WalkSpeed = Config.CustomSpeedValue end end) print("[FORCE_SPEED] Speed loop started, setting speed to " .. Config.CustomSpeedValue .. ".") else if Humanoid then Humanoid.WalkSpeed = OriginalWalkSpeed end print("[FORCE_SPEED] Speed loop stopped, returning to original speed.") end end -- --- Rayfield v2 Style GUI --- local function create_gui() local playerGui = LocalPlayer:WaitForChild("PlayerGui", 20) if not playerGui then warn("[GUI_ERROR] PlayerGui not found. GUI cannot be created."); return end if playerGui:FindFirstChild("Rayfield_Ultimate_PC_GUI_v117") then playerGui.Rayfield_Ultimate_PC_GUI_v117:Destroy() end local success, result = pcall(function() print("[GUI_STATUS] Creating Rayfield v2 style GUI...") gui_screen_gui = Instance.new("ScreenGui") gui_screen_gui.Name = "Rayfield_Ultimate_PC_GUI_v117" gui_screen_gui.Parent = playerGui gui_screen_gui.ResetOnSpawn = false local MainFrame = Instance.new("Frame") MainFrame.Size = UDim2.new(0.28, 0, 0.6, 0) MainFrame.Position = UDim2.new(0.05, 0, 0.2, 0) MainFrame.BackgroundColor3 = Color3.new(0.12, 0.12, 0.12) MainFrame.BorderSizePixel = 0 MainFrame.Parent = gui_screen_gui local Corner = Instance.new("UICorner", MainFrame) Corner.CornerRadius = UDim.new(0, 12) local Stroke = Instance.new("UIStroke", MainFrame) Stroke.Color = Color3.new(0.2, 0.2, 0.2) Stroke.Thickness = 2 Stroke.ApplyStrokeMode = Enum.ApplyStrokeMode.Border -- --- DRAGGING LOGIC --- local dragging = false local dragOffset = Vector2.new() local lastMousePos = Vector2.new() local TitleBar = Instance.new("Frame", MainFrame) TitleBar.Size = UDim2.new(1, 0, 0.1, 0) TitleBar.BackgroundColor3 = Color3.new(0.1, 0.1, 0.1) local Title = Instance.new("TextLabel", TitleBar) Title.Size = UDim2.new(1, 0, 1, 0); Title.BackgroundTransparency = 1; Title.Text = "Duels Warriors Ultimate" Title.TextColor3 = Color3.new(1, 1, 1); Title.Font = Enum.Font.SourceSansBold; Title.TextSize = 18 TitleBar.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then dragging = true dragOffset = input.Position - MainFrame.AbsolutePosition lastMousePos = input.Position end end) UserInputService.InputChanged:Connect(function(input) if dragging and (input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch) then local delta = input.Position - lastMousePos MainFrame.Position = UDim2.new(0, MainFrame.AbsolutePosition.X + delta.X, 0, MainFrame.AbsolutePosition.Y + delta.Y) lastMousePos = input.Position end end) UserInputService.InputEnded:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then dragging = false end end) -- --- END DRAGGING LOGIC --- local ContentFrame = Instance.new("Frame", MainFrame) ContentFrame.Size = UDim2.new(1, 0, 0.9, 0) ContentFrame.Position = UDim2.new(0, 0, 0.1, 0) ContentFrame.BackgroundTransparency = 1 local Layout = Instance.new("UIListLayout", ContentFrame) Layout.Padding = UDim.new(0, 10); Layout.HorizontalAlignment = Enum.HorizontalAlignment.Center; Layout.FillDirection = Enum.FillDirection.Vertical; Layout.SortOrder = Enum.SortOrder.LayoutOrder local function create_toggle_button(name, callback, config_key, order) local button = Instance.new("TextButton", ContentFrame) button.Size = UDim2.new(0.9, 0, 0.08, 0); button.BackgroundColor3 = Config[config_key] and Color3.new(0, 0.8, 0.4) or Color3.new(0.8, 0.2, 0.2) button.TextColor3 = Color3.new(1, 1, 1); button.Font = Enum.Font.SourceSansBold; button.TextSize = 14; button.Text = name .. ": " .. (Config[config_key] and "ON" or "OFF"); button.LayoutOrder = order local buttonCorner = Instance.new("UICorner", button); buttonCorner.CornerRadius = UDim.new(0, 8) button.MouseButton1Click:Connect(function() Config[config_key] = not Config[config_key] button.Text = name .. ": " .. (Config[config_key] and "ON" or "OFF") button.BackgroundColor3 = Config[config_key] and Color3.new(0, 0.8, 0.4) or Color3.new(0.8, 0.2, 0.2) pcall(callback, Config[config_key]) end) end local function create_slider(name, config_key, order, min_val, max_val, step) local container = Instance.new("Frame", ContentFrame) container.Size = UDim2.new(0.9, 0, 0.1, 0); container.BackgroundColor3 = Color3.new(0.15, 0.15, 0.15); container.LayoutOrder = order; container.BorderSizePixel = 0 local containerCorner = Instance.new("UICorner", container); containerCorner.CornerRadius = UDim.new(0, 8) local label = Instance.new("TextLabel", container) label.Size = UDim2.new(1, 0, 0.4, 0); label.Position = UDim2.new(0, 0, 0, 0); label.BackgroundTransparency = 1; label.TextColor3 = Color3.new(0.9, 0.9, 0.9); label.TextXAlignment = Enum.TextXAlignment.Left; label.Text = " " .. name .. ": " .. tostring(Config[config_key]) label.Font = Enum.Font.SourceSans; label.TextSize = 14 local sliderTrack = Instance.new("Frame", container) sliderTrack.Size = UDim2.new(0.9, 0, 0.25, 0); sliderTrack.Position = UDim2.new(0.05, 0, 0.5, 0); sliderTrack.BackgroundColor3 = Color3.new(0.2, 0.2, 0.2) local trackCorner = Instance.new("UICorner", sliderTrack); trackCorner.CornerRadius = UDim.new(0, 5) local sliderFill = Instance.new("Frame", sliderTrack) sliderFill.Size = UDim2.new((Config[config_key] - min_val) / (max_val - min_val), 0, 1, 0); sliderFill.BackgroundColor3 = Color3.new(0, 0.6, 1) local fillCorner = Instance.new("UICorner", sliderFill); fillCorner.CornerRadius = UDim.new(0, 5) local sliderHandle = Instance.new("Frame", sliderFill) sliderHandle.Size = UDim2.new(0, 10, 1.5, 0); sliderHandle.Position = UDim2.new(1, -5, 0, -2); sliderHandle.BackgroundColor3 = Color3.new(0.2, 0.8, 1) local handleCorner = Instance.new("UICorner", sliderHandle); handleCorner.CornerRadius = UDim.new(0, 5) local sliding = false sliderTrack.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then sliding = true end end) UserInputService.InputChanged:Connect(function(input) if sliding and (input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch) then local relativePos = (input.Position.X - sliderTrack.AbsolutePosition.X) / sliderTrack.AbsoluteSize.X local newValue = min_val + math.clamp(relativePos, 0, 1) * (max_val - min_val) if step then newValue = math.floor(newValue / step) * step end Config[config_key] = math.floor(newValue * 100) / 100 sliderFill.Size = UDim2.new((Config[config_key] - min_val) / (max_val - min_val), 0, 1, 0) label.Text = " " .. name .. ": " .. tostring(Config[config_key]) if name == "Speed Value" then forceSpeed() end end end) UserInputService.InputEnded:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then sliding = false end end) end -- Toggle Buttons create_toggle_button("Anti-Cheat Bypass", function(v) Config.AntiCheatBypass = v; if v then applyBypass() end end, "AntiCheatBypass", 1) create_toggle_button("Auto Parry", function(v) Config.AutoParryEnabled = v end, "AutoParryEnabled", 2) create_toggle_button("Speed", function(v) Config.SpeedEnabled = v; forceSpeed() end, "SpeedEnabled", 3) -- Sliders create_slider("Speed Value", "CustomSpeedValue", 4, 16, 500, 1) create_slider("Parry Distance", "ParryDistance", 5, 5, 100, 1) create_slider("Parry Delay", "AutoParryDelay", 6, 0.005, 0.5, 0.005) print("[GUI_SUCCESS] Rayfield v2 style GUI successfully created.") end) if not success then warn("[GUI_FATAL_ERROR] GUI creation error: " .. tostring(result)) end end -- --- Keybinds --- UserInputService.InputBegan:Connect(function(input, gameProcessed) -- GUI Toggle Keybind (FIXED) if input.KeyCode == Config.GuiToggleKey then -- This debug message will help us confirm the key is being detected. print("[DEBUG] GUI Toggle Key (" .. input.KeyCode.Name .. ") pressed!") -- We check if the gui_screen_gui object exists before trying to toggle it. if gui_screen_gui then gui_screen_gui.Enabled = not gui_screen_gui.Enabled print("[KEYBIND] GUI " .. (gui_screen_gui.Enabled and "opened" or "closed")) else warn("[GUI_TOGGLE] GUI not yet created or found.") end return -- Consume the input so it doesn't get processed by the game. end -- Speed Toggle Keybind if input.KeyCode == Config.SpeedKey then -- We don't check `gameProcessed` here to ensure it works even if a Roblox menu is open. Config.SpeedEnabled = not Config.SpeedEnabled forceSpeed() print("[KEYBIND] Speed " .. (Config.SpeedEnabled and "enabled" or "disabled")) end end) -- --- Main Loop --- local lastAutoParryTick = 0 RunService.Heartbeat:Connect(function() -- Auto Parry Loop with Cooldown if Config.AutoParryEnabled and tick() - lastAutoParryTick > Config.AutoParryDelay then local didParry = handleAutoParry() if didParry then lastAutoParryTick = tick() end end end) -- --- Script Initialization --- task.wait(2) setupCharacter() create_gui() applyBypass() forceSpeed() print("Duels Warriors PC Ultimate Script v117.0 loaded successfully! You can open and close the GUI with the Right SHIFT key.")