Creating a chat command that sets a variable and spawns an entity

Alright, i decided to rewrite me previous post.

So i have an entity that when spawned outputs that a money case has been dropped and if you find it and press use it gives you the amount of DarkRP money stored in the variable named casevalue.

I was wondering how i could make a chat command that sets the variable inside the entity and spawns the entity with that value

For example.

!moneycase 10000 and that would set the case value variable to 10k and spawn the entity into the game.

i apoligise for rewriting the thread.

I am very new to lua scripting and i just hope you awesome people here can help me out :smiley:

Thanks

ive already tried the wiki and looking at Playersay but it doesnt have anything to do with inputting a players number into a variable there is nothing about saving infomation or args from a playerssay