I'm presenting a new script, that is, critical hits/strike. If you don't know what a critical hit/strike is, do you even into games br0? Basically, a critical hit/strike is a hit that deals massively more damage than a normal one upon a particular criterion and formula.
I was capable of finishing the script 2 days ago, but unfortunately time was not with my side (f u c c T i m e) and errors kept occurring repetitively.
Also, the code has every bit of it commented so, hopefully, there will not be anything vague.
The critical hits/strike formula
It's very unambiguous and explicitly clear to comprehend.
The raw damage of a bullet multiplied by the sum of the base critical multiplier and the lucky critical addition subtracted by the armor reduction, is conserved in a variable and added to the main damage, that is, the bullet's damage.
For instance, you are carrying a USP that deals 12 damage. So the critical hit/strike damage would be as follows:
12 * ((1.5 + 0.5) - 0.5)
Where 1.5 (150%) is the base critical multiplier, 0.5 (50%, assuming it is randomly 50%) is the lucky critical addition and the second 0.5 is the armor reduction (the armor of the player, assuming he has 50% armor). So we would end up with 18 damage, adding 18 to the main damage (12) equals 30.
By the way, if the player has armor the damage of the critical hit/strike will be apportioned to the health by 60% and to the armor by 40%.
Copyright license
You can use, edit and maintain the file. You can also upload the file to other websites with the consultation of me.
Credits
I would thank @ Tajifun for his awesome blood sprite that appended a ring of fun to my script.
If you found any bugs or you have suggestions to suggest, feel free to post them down below. Thanks!
edited 1×, last 24.08.17 10:30:17 am
Approved by Yates
Download
179 kb, 517 Downloads