Simple Lua Coding for Sweps. Primary fire: make the victim dizzy and reduce walk&sprint speed

Exactly as the title…
Please help me making a swep that gives the player motion blur like dizzy effects and reduce walk&sprint speed.
Please help me!
I am a newbbie to Lua, so please teach me…

p.s sorry for my bad English…




Might help.

Thank you, thank you, and thank you! really appreciated…
But can you make some codes for a full swep?
Maybe if you can, I want to add a timer that makes the player dizzy for like 10 secs
As i said, I’m a newbie to Lua

In the Entity.TakeDamage hook ( check if its a player, then check if the player is alive, then check if the damage was done with this gun. Then start motion blurring the player’s screen and reduce his walk and run speeds. Set a timer for 10 seconds to set the motion blur and walk and run speeds back to normal.