local utility = {} getgenv().config = { enable = true, delay = 0.0 } utility.get_gun = function() for _, tool in next, game.Players.LocalPlayer.Character:GetChildren() do if tool:IsA("Tool") and tool:FindFirstChild("Ammo") then return tool end end end utility.rapid = function(tool) tool:Activate() end getgenv().is_firing = false game:GetService("UserInputService").InputBegan:Connect(function(i) if i.UserInputType == Enum.UserInputType.MouseButton1 then local gun = utility.get_gun() if config.enable and gun and not is_firing then is_firing = true while is_firing do utility.rapid(gun) task.wait(config.delay) end end end end) game:GetService("UserInputService").InputEnded:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 then is_firing = false end end)