The weapon I'm trying to create needs its secondary fire to change a player's keyvalue ('effects'), only I don't know how to do get or set a keyvalue.
I know what keyvalue I want to change but I don't know how to access it.

From CBasePlayer section in the angelscript documentation:
Code:
void KeyValue(KeyValueData@)
Sets keyvalue data on this entity
What is KeyValueData@ ?