@ thedoctor989 Very good, you almost got it. Just one little error.
If you look at "state=12" it loops back to "state=12" in an endless cycle. Easy to miss.
Here it is fixed. Couple things first, try not to use caps in scripts unless absolutely necessary ( can cause problems )
I changed "plraddhealth" to "plrsubhealth" to it's more uniform ( Change the sub health amount to meet your needs )
;Artificial Intelligence Script
desc = Press F key to But Weapon Health -40
;If player presses F key, weapon will be picked up, and added to player's weapon inventory.
;Triggers
:state=0:hudreset,hudx=50,hudy=90,hudsize=32,hudtext=Press F to buy this weapon,hudname=weaponpromt,hudhide=1,hudmake=display,state=10
:state=10,plrdistwithin=45:hudshow=weaponpromt
:state=10,plrdistfurther=50:hudunshow=weaponpromt
;Player Press F key
:state=10,scancodekeypressed=33:hudunshow=weaponpromt,playertake,coloff,rundecal=-1,plrsubhealth=10,plrsound=audiobank\items\pickupweapon.wav
;End of Script
You'll noticed all the "states" are at "state=10" until something happens. The player can walk away and return and the hud is ready again.
I increase the "hud" size larger, was to small to see
Best,
My games never have bugs. They just develop random features..
Lots and lots of random features...