> For the complete documentation index, see [llms.txt](https://aklgaming.gitbook.io/documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://aklgaming.gitbook.io/documentation/code-snippets/fix-spam-punch.md).

# Fix Spam Punch

Spam punch, yes that's what happens a lot on people's servers, Here I will provide the code to solve the problem.

```lua
CreateThread(function()
   while true do
   Wait(0)
   DisableControlAction(1, 140, true)
   if not IsPlayerTargettingAnything(PlayerId()) then
   DisableControlAction(1, 141, true)
   DisableControlAction(1, 142, true)
   end
  end
end
```

## Video Preview

* [YouTube](https://youtu.be/31SFa_8WGqw)
