Optimize your addon
Function : player.GetAll (Wiki page : https://wiki.garrysmod.com/page/player/GetAll )
Hook : GM:PostDrawOpaqueRenderables (Wiki page : https://wiki.garrysmod.com/page/GM/PostDrawOpaqueRenderables )
File : addons/customhq-stungun/lua/weapons/weapon_stungun/shared.lua
└►Line #247-> 27241 calls
Call History
#1 File:addons/customhq-stungun/lua/weapons/weapon_stungun/shared.lua, Line #264
#2 File:addons/customhq-stungun/lua/weapons/weapon_stungun/shared.lua, Line #247
You don't need to call player.GetAll on each frame.
And yes i checked the code, and yes you can do it in much better ways than "scanning for player that got this weapon"