I wrote up a couple of fun scripts here that you can use in Nightbot commands. There will be more scripts posted here as I relearn PHP (and CSS; this home page looks like garbage). For now, though, my scripts are nothing too complex, like saying "Hello" to the command user, determining the length of a given phrase, and calculating the determinant of a 3x3 matrix. Very simple stuff... hold up.
Hello.php - Says "Hello" (among other possible greetings) to the command user. A tad useless since this can be achieved via the Nightbot $(user) variable, but this was a good way to practice using URL parameters and Nightbot request headers. By the way, because the script gets the command user from Nightbot's request header, it won't work if you try running the script in your browser. I mean, I can't actually stop you from trying that, but you'll see what happens...
Length.php - Determines the length of a given phrase. You can, of course, do the same thing quite easily with the JS string.length property in Nightbot's $(eval) variable, but I bet that one thing my script has that 50% of the other schmucks don't have in their scripts is error handling. Take that.
Det.php - Calculates the determinant of a 3x3 matrix. You might know what a matrix is, but as for the determinant, it's too much of a mathy concept to explain what it means here; you're better off just Googling it. Anyways, here's the script.
SMM.php - Make Nightbot send multiple messages to your Twitch or Discord chat! The i parameter is the delay in seconds and the d parameter is whether to delay the second message or not.
DiscordMsg.php - Send a message to your Discord server as a bot! WEBHOOK_URL is your Discord webhook, MESSAGE is your message to send, USERNAME is the bot username, PICTURE_URL is the picture you want for the bot avatar, enter true or false for tts, and SUCCESS_MESSAGE is the message for Nightbot to post when it successfully sends a message.
YTSubs.php - Get a YouTube channel's subscriber count. CHANNEL_ID is the channel's ID, not its username.