Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $api.on("send", function(e, data) {
- var colors = ['#FF0000','#f26522','#fff200','#00a651','#28abe2','#2e3192','#6868ff'];
- var newstr = '';
- var counter = 0;
- var chars = data.msg.split('');
- for (var x in data.msg.split('')) {
- if (chars[x]!=' ') {
- newstr = newstr + '[' + colors[counter] + ']' + chars[x] + '[/#]';
- counter++;
- } else {
- newstr = newstr + ' ';
- }
- if (counter >= colors.length) {
- counter = 0;
- }
- }
- data.msg = newstr;
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement