Created
August 6, 2022 02:35
-
-
Save Merlin04/9407cadb9ab222e96a0a6e8d995a29a7 to your computer and use it in GitHub Desktop.
Assemble hack
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
// Run this in your browser console | |
function makeColorGradient(frequency1, frequency2, frequency3, | |
phase1, phase2, phase3, | |
center, width, len) | |
{ | |
if (center == undefined) center = 128; | |
if (width == undefined) width = 127; | |
if (len == undefined) len = 50; | |
let a = []; | |
[] | |
for (var i = 0; i < len; ++i) | |
{ | |
var red = Math.sin(frequency1*i + phase1) * width + center; | |
var grn = Math.sin(frequency2*i + phase2) * width + center; | |
var blu = Math.sin(frequency3*i + phase3) * width + center; | |
a.push(RGB2Color(red, grn, blu)); | |
// document.write( '<font color="' + RGB2Color(red,grn,blu) + '">█</font>'); | |
} | |
return a; | |
} | |
function RGB2Color(r,g,b) | |
{ | |
return '#' + byte2Hex(r) + byte2Hex(g) + byte2Hex(b); | |
} | |
function byte2Hex(n) | |
{ | |
var nybHexString = "0123456789ABCDEF"; | |
return String(nybHexString.substr((n >> 4) & 0x0F,1)) + nybHexString.substr(n & 0x0F,1); | |
} | |
let c = makeColorGradient(.3,.3,.3,0,2,4, 230,25, 100); | |
let p = 0; | |
setInterval(() => { | |
socket.emit("color", c[p]); | |
p++; | |
if(p >= c.length) p = 0; | |
}, 100); | |
let e = "🏳️🌈"; | |
setInterval(() => { | |
socket.emit("emoji", e); | |
}, 1000 * 10); | |
let n = `We're no strangers to love | |
You know the rules and so do I (do I) | |
A full commitment's what I'm thinking of | |
You wouldn't get this from any other guy | |
I just wanna tell you how I'm feeling | |
Gotta make you understand | |
Never gonna give you up | |
Never gonna let you down | |
Never gonna run around and desert you | |
Never gonna make you cry | |
Never gonna say goodbye | |
Never gonna tell a lie and hurt you | |
We've known each other for so long | |
Your heart's been aching, but you're too shy to say it (say it) | |
Inside, we both know what's been going on (going on) | |
We know the game and we're gonna play it | |
And if you ask me how I'm feeling | |
Don't tell me you're too blind to see | |
Never gonna give you up | |
Never gonna let you down | |
Never gonna run around and desert you | |
Never gonna make you cry | |
Never gonna say goodbye | |
Never gonna tell a lie and hurt you | |
Never gonna give you up | |
Never gonna let you down | |
Never gonna run around and desert you | |
Never gonna make you cry | |
Never gonna say goodbye | |
Never gonna tell a lie and hurt you | |
We've known each other for so long | |
Your heart's been aching, but you're too shy to say it (to say it) | |
Inside, we both know what's been going on (going on) | |
We know the game and we're gonna play it | |
I just wanna tell you how I'm feeling | |
Gotta make you understand | |
Never gonna give you up | |
Never gonna let you down | |
Never gonna run around and desert you | |
Never gonna make you cry | |
Never gonna say goodbye | |
Never gonna tell a lie and hurt you | |
Never gonna give you up | |
Never gonna let you down | |
Never gonna run around and desert you | |
Never gonna make you cry | |
Never gonna say goodbye | |
Never gonna tell a lie and hurt you | |
Never gonna give you up | |
Never gonna let you down | |
Never gonna run around and desert you | |
Never gonna make you cry | |
Never gonna say goodbye | |
Never gonna tell a lie and hurt you`.replaceAll("\n", " ").split(" ") | |
let pn = 0; | |
setInterval(() => { | |
socket.emit("acceptMessage", n[pn]); | |
pn++; | |
if(pn >= n.length) pn = 0; | |
}, 250); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment