Firstly, you can see how to set out ulx commands
hereSecondly, you can see TTT hooks
here (the one you are looking for is TTTScoreboardColorForPlayer)
Thirdly, some TTT functions you can use for karma are...
Player:SetLiveKarma( amount )
Player:SetBaseKarma( amount )
You can see the differences between Live and Base karma
hereAlso Player:Give( "weapon_name" ) is what you would use for !give
Hope you can work it out