Beginner Scripting help

This might be more a request than a question, but I’m posting this in “Questions” because I don’t plan on just copy/pasting the replies in “whatever.lua” and being done, but to provide as an example.

I’d like someone to demonstrate a code(s) that can
-reduce player damage (1/3, to be precise)
-void player fall damage
-void player explosion damage
-create an object/entity on the player (ie. When player gets hurt, a medkit automatically spawns near or on them)

Please type in a script that demonstrates any of the three actions above and define what each word/phrase of the script does and why it’s there.
And please, DO NOT BE AFRAID TO ADD DETAIL. If something can be explained more, please explain it more. I normally understand things fairly quickly, but lua has beaten me mercilessly, so explain every bit of the script as clearly as possible with as much detail as possible.

Any reply at all is very much appreciated.

Gamemode.ScalePlayerDamage for first 3.
Gamemode.PlayerHurt and ents.Create on the last one.
I’ll add more detail later.