local Players = game:GetService("Players") local lp = Players.LocalPlayer local rs = game:GetService("RunService") local UIS = game:GetService("UserInputService") local TweenService = game:GetService("TweenService") function setupKeyMap() end function updateToggles() end local RunService = game:GetService("RunService") function fastWait(frames) frames = frames or 1 for i = 1, frames do RunService.RenderStepped:Wait() end end local keyCount = 4 local keyMap = {} local recent = {} local autoPlayEnabled = false local targetNotes = "BFNotes" -- Can be "BFNotes" or "DadNotes" local configGui = Instance.new("ScreenGui") configGui.Name = "AutoPlayConfig" configGui.Parent = game:GetService("CoreGui") local mainFrame = Instance.new("Frame") mainFrame.Size = UDim2.new(0, 280, 0, 310) mainFrame.Position = UDim2.new(0.1, 0, 0.1, 0) mainFrame.BackgroundColor3 = Color3.fromRGB(45, 45, 45) mainFrame.BorderSizePixel = 0 mainFrame.Active = true mainFrame.Draggable = true mainFrame.Parent = configGui local corner = Instance.new("UICorner") corner.CornerRadius = UDim.new(0, 8) corner.Parent = mainFrame local title = Instance.new("TextLabel") title.Size = UDim2.new(1, 0, 0, 35) title.Position = UDim2.new(0, 0, 0, 0) title.BackgroundColor3 = Color3.fromRGB(30, 30, 30) title.TextColor3 = Color3.fromRGB(255, 255, 255) title.Text = "FNP Autoplayer" title.TextScaled = true title.Font = Enum.Font.GothamBold title.Parent = mainFrame local titleCorner = Instance.new("UICorner") titleCorner.CornerRadius = UDim.new(0, 8) titleCorner.Parent = title local keyLabel = Instance.new("TextLabel") keyLabel.Size = UDim2.new(1, -20, 0, 20) keyLabel.Position = UDim2.new(0, 10, 0, 45) keyLabel.BackgroundTransparency = 1 keyLabel.TextColor3 = Color3.fromRGB(255, 255, 255) keyLabel.Text = "Number of Keys: " .. keyCount keyLabel.Font = Enum.Font.Gotham keyLabel.TextScaled = true keyLabel.TextXAlignment = Enum.TextXAlignment.Left keyLabel.Parent = mainFrame local keyToggleFrame = Instance.new("Frame") keyToggleFrame.Size = UDim2.new(1, -20, 0, 35) keyToggleFrame.Position = UDim2.new(0, 10, 0, 70) keyToggleFrame.BackgroundTransparency = 1 keyToggleFrame.Parent = mainFrame local keyToggles = {} for i = 4, 9 do local toggle = Instance.new("TextButton") toggle.Size = UDim2.new(0, 30, 1, 0) toggle.Position = UDim2.new(0, (i-4)*35, 0, 0) toggle.BackgroundColor3 = i == keyCount and Color3.fromRGB(0, 120, 215) or Color3.fromRGB(80, 80, 80) toggle.TextColor3 = Color3.fromRGB(255, 255, 255) toggle.Text = tostring(i) toggle.TextScaled = true toggle.Font = Enum.Font.GothamBold toggle.Parent = keyToggleFrame local toggleCorner = Instance.new("UICorner") toggleCorner.CornerRadius = UDim.new(0, 6) toggleCorner.Parent = toggle toggle.MouseButton1Click:Connect(function() keyCount = i setupKeyMap(keyCount) updateToggles() end) table.insert(keyToggles, toggle) end local notesLabel = Instance.new("TextLabel") notesLabel.Size = UDim2.new(1, -20, 0, 20) notesLabel.Position = UDim2.new(0, 10, 0, 115) notesLabel.BackgroundTransparency = 1 notesLabel.TextColor3 = Color3.fromRGB(255, 255, 255) notesLabel.Text = "Target: " notesLabel.TextScaled = true notesLabel.Font = Enum.Font.Gotham notesLabel.TextXAlignment = Enum.TextXAlignment.Left notesLabel.Parent = mainFrame local notesToggleFrame = Instance.new("Frame") notesToggleFrame.Size = UDim2.new(1, -20, 0, 35) notesToggleFrame.Position = UDim2.new(0, 10, 0, 140) notesToggleFrame.BackgroundTransparency = 1 notesToggleFrame.Parent = mainFrame local bfToggle = Instance.new("TextButton") bfToggle.Size = UDim2.new(0.45, 0, 1, 0) bfToggle.Position = UDim2.new(0.55, 0, 0, 0) bfToggle.BackgroundColor3 = targetNotes == "BFNotes" and Color3.fromRGB(0, 120, 215) or Color3.fromRGB(80, 80, 80) bfToggle.TextColor3 = Color3.fromRGB(255, 255, 255) bfToggle.Text = "Right Side" bfToggle.TextScaled = true bfToggle.Font = Enum.Font.Gotham bfToggle.Parent = notesToggleFrame local bfCorner = Instance.new("UICorner") bfCorner.CornerRadius = UDim.new(0, 6) bfCorner.Parent = bfToggle local dadToggle = Instance.new("TextButton") dadToggle.Size = UDim2.new(0.45, 0, 1, 0) dadToggle.Position = UDim2.new(0, 0, 0, 0) dadToggle.BackgroundColor3 = targetNotes == "DadNotes" and Color3.fromRGB(0, 120, 215) or Color3.fromRGB(80, 80, 80) dadToggle.TextColor3 = Color3.fromRGB(255, 255, 255) dadToggle.Text = "Left Side" dadToggle.TextScaled = true dadToggle.Font = Enum.Font.Gotham dadToggle.Parent = notesToggleFrame local dadCorner = Instance.new("UICorner") dadCorner.CornerRadius = UDim.new(0, 6) dadCorner.Parent = dadToggle local accuracy = 99 local maxDelay = 0.1 -- 100ms local accLabel = Instance.new("TextLabel") accLabel.Size = UDim2.new(0.5, -5, 0, 25) accLabel.Position = UDim2.new(0, 10, 0, 185) accLabel.BackgroundTransparency = 1 accLabel.TextColor3 = Color3.fromRGB(255, 255, 255) accLabel.Text = "Accuracy:" accLabel.TextScaled = true accLabel.Font = Enum.Font.Gotham accLabel.TextXAlignment = Enum.TextXAlignment.Left accLabel.Parent = mainFrame local accBox = Instance.new("TextBox") accBox.Size = UDim2.new(0.4, 0, 0, 25) accBox.Position = UDim2.new(0.55, 0, 0, 185) accBox.BackgroundColor3 = Color3.fromRGB(60, 60, 60) accBox.TextColor3 = Color3.fromRGB(255, 255, 255) accBox.PlaceholderColor3 = Color3.fromRGB(180, 180, 180) accBox.PlaceholderText = "0-100" accBox.Text = tostring(accuracy) accBox.TextScaled = true accBox.Font = Enum.Font.Gotham accBox.Parent = mainFrame local accCorner = Instance.new("UICorner") accCorner.CornerRadius = UDim.new(0, 6) accCorner.Parent = accBox local autoPlayToggle = Instance.new("TextButton") autoPlayToggle.Size = UDim2.new(1, -20, 0, 45) autoPlayToggle.Position = UDim2.new(0, 10, 0, 220) autoPlayToggle.BackgroundColor3 = autoPlayEnabled and Color3.fromRGB(50, 200, 50) or Color3.fromRGB(200, 50, 50) autoPlayToggle.TextColor3 = Color3.fromRGB(255, 255, 255) autoPlayToggle.TextScaled = true autoPlayToggle.Text = autoPlayEnabled and "AUTO PLAY: ON" or "AUTO PLAY: OFF" autoPlayToggle.Font = Enum.Font.GothamBold autoPlayToggle.Parent = mainFrame local autoCorner = Instance.new("UICorner") autoCorner.CornerRadius = UDim.new(0, 8) autoCorner.Parent = autoPlayToggle local statusLabel = Instance.new("TextLabel") statusLabel.Size = UDim2.new(1, -20, 0, 20) statusLabel.Position = UDim2.new(0, 10, 0, 275) statusLabel.BackgroundTransparency = 1 statusLabel.TextScaled = true statusLabel.TextColor3 = Color3.fromRGB(200, 200, 200) statusLabel.Text = "Press F8 to toggle UI" statusLabel.Font = Enum.Font.Gotham statusLabel.TextXAlignment = Enum.TextXAlignment.Left statusLabel.Parent = mainFrame function updateToggles() keyLabel.Text = "Number of Keys: " .. keyCount for i, toggle in ipairs(keyToggles) do local num = i + 3 toggle.BackgroundColor3 = num == keyCount and Color3.fromRGB(0, 120, 215) or Color3.fromRGB(80, 80, 80) end bfToggle.BackgroundColor3 = targetNotes == "BFNotes" and Color3.fromRGB(0, 120, 215) or Color3.fromRGB(80, 80, 80) dadToggle.BackgroundColor3 = targetNotes == "DadNotes" and Color3.fromRGB(0, 120, 215) or Color3.fromRGB(80, 80, 80) autoPlayToggle.BackgroundColor3 = autoPlayEnabled and Color3.fromRGB(50, 200, 50) or Color3.fromRGB(200, 50, 50) autoPlayToggle.Text = autoPlayEnabled and "AUTO PLAY: ON" or "AUTO PLAY: OFF" end function setupKeyMap(count) keyMap = {} keyCount = count if count == 4 then -- Left, Down, Up, Right keyMap = { ["1"] = 0x25, -- Left ["2"] = 0x28, -- Down ["3"] = 0x26, -- Up ["4"] = 0x27, -- Right } elseif count == 5 then -- Left, Down, Space, Up, Right keyMap = { ["1"] = 0x25, -- Left ["2"] = 0x28, -- Down ["3"] = 0x20, -- Space (middle key) ["4"] = 0x26, -- Up ["5"] = 0x27, -- Right } elseif count == 6 then -- Left, Down, Up, Right, 7, 8 (using 1,2,3,7,8,9 keys) keyMap = { ["1"] = 0x31, -- 1 ["2"] = 0x32, -- 2 ["3"] = 0x33, -- 3 ["4"] = 0x38, -- 8 ["5"] = 0x39, -- 9 ["6"] = 0x30, -- 0 } elseif count == 7 then -- Left, Down, Up, Right, 7, 8, 9 (with space in the middle) keyMap = { ["1"] = 0x31, -- 1 ["2"] = 0x32, -- 2 ["3"] = 0x33, -- 3 ["4"] = 0x20, -- Space (middle key) ["5"] = 0x38, -- 8 ["6"] = 0x39, -- 9 ["7"] = 0x30, -- 0 } elseif count == 8 then -- 1, 2, 3, 4, 7, 8, 9, 0 keyMap = { ["1"] = 0x31, -- 1 ["2"] = 0x32, -- 2 ["3"] = 0x33, -- 3 ["4"] = 0x34, -- 4 ["5"] = 0x37, -- 7 ["6"] = 0x38, -- 8 ["7"] = 0x39, -- 9 ["8"] = 0x30, -- 0 } elseif count == 9 then -- 1, 2, 3, 4, Space, 7, 8, 9, 0 keyMap = { ["1"] = 0x31, -- 1 ["2"] = 0x32, -- 2 ["3"] = 0x33, -- 3 ["4"] = 0x34, -- 4 ["5"] = 0x20, -- Space (middle key) ["6"] = 0x37, -- 7 ["7"] = 0x38, -- 8 ["8"] = 0x39, -- 9 ["9"] = 0x30, -- 0 } else warn("Invalid key count. Defaulting to 4 keys.") setupKeyMap(4) end print("AutoPlay configured for " .. count .. " keys") updateToggles() end local function inR(note, rcp) local np = note.AbsolutePosition + note.AbsoluteSize / 2 local rp = rcp.AbsolutePosition + rcp.AbsoluteSize / 2 return (np - rp).Magnitude < (rcp.AbsoluteSize.X / 3) end accBox.FocusLost:Connect(function(enterPressed) local val = tonumber(accBox.Text) if val and val >= 0 and val <= 100 then accuracy = val print("Accuracy set to:", accuracy) else accBox.Text = tostring(accuracy) -- reset to current valid value end end) local function loop() if not autoPlayEnabled then return end local gui = lp.PlayerGui:FindFirstChild("GameUI") if not gui then return end local realGameUI = gui:FindFirstChild("realGameUI") if not realGameUI then return end local notes = realGameUI:FindFirstChild("Notes") if not notes then return end local target = notes:FindFirstChild(targetNotes) if not target then return end for _, note in ipairs(target:GetChildren()) do if note:IsA("GuiObject") then local lowerName = string.lower(note.Name) if string.find(lowerName, "hurt") or string.find(lowerName, "poison") or string.find(lowerName, "kill") or string.find(lowerName, "potion") then note:Destroy() -- permanently delete end end end local rcps = {} for _, c in ipairs(target:GetChildren()) do if keyMap[c.Name] and c:IsA("GuiObject") and c.AbsoluteSize.X > 0 then table.insert(rcps, c) end end for _, n in ipairs(target:GetChildren()) do if not keyMap[n.Name] and n:IsA("GuiObject") and n.Visible then for _, r in ipairs(rcps) do if inR(n, r) and not recent[n] then local vk = keyMap[r.Name] if vk then local rand = math.random(1,100) local delayTime = 0 if rand > accuracy then delayTime = math.random() * maxDelay end task.delay(delayTime, function() keypress(vk) fastWait(5) keyrelease(vk) end) end recent[n] = tick() n.Visible = false end end end end local now = tick() for n, tm in pairs(recent) do if now - tm > 0.5 then recent[n] = nil end end end bfToggle.MouseButton1Click:Connect(function() targetNotes = "BFNotes" updateToggles() end) dadToggle.MouseButton1Click:Connect(function() targetNotes = "DadNotes" updateToggles() end) autoPlayToggle.MouseButton1Click:Connect(function() autoPlayEnabled = not autoPlayEnabled updateToggles() if autoPlayEnabled then print("AutoPlay enabled!") else print("AutoPlay disabled!") end end) UIS.InputBegan:Connect(function(input, processed) if not processed and input.KeyCode == Enum.KeyCode.F8 then configGui.Enabled = not configGui.Enabled end end) setupKeyMap(4) rs.Heartbeat:Connect(loop) print("AutoPlay using configured keys loaded! Press F8 to open settings.")