Last active
February 13, 2016 23:46
-
-
Save LandonPowell/7081097b9b0253b4b6e1 to your computer and use it in GitHub Desktop.
This is a clone of "Make America Great Again"'s code that he wrote for my website. It generates a nick in the style of his username, "get52". I'm using LJPowell indents because they're the master race.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function randomChar(string) { | |
return string.charAt(Math.floor(Math.random() * string.length)) ;} | |
function generateName() { | |
var vowels = "aeiou"; | |
var consonants = "bcdfghjklmnpqrstvwxyz"; | |
return randomChar(consonants) + | |
randomChar(vowels) + | |
randomChar(consonants) + | |
(Math.floor(Math.random()*89)+10) ;} | |
var flair = "$Megrim|/^/^@@0f0#fff "; | |
var style = "||$Quicksand|@@0f0#fff: "; | |
CLIENT.on('message', function(){ | |
CLIENT.attributes.style = flair + generateName() + style ;}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment