0% found this document useful (0 votes)
38 views4 pages

User Script

This document contains two user scripts for the game Kour.io that modify the player's nickname appearance. The first script applies rainbow colors to each character in the nickname 'SAYGEX', while the second script creates a gradient effect using specified colors. Both scripts utilize the unityInstance to send the styled nickname to the game environment.

Uploaded by

nafad12153
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views4 pages

User Script

This document contains two user scripts for the game Kour.io that modify the player's nickname appearance. The first script applies rainbow colors to each character in the nickname 'SAYGEX', while the second script creates a gradient effect using specified colors. Both scripts utilize the unityInstance to send the styled nickname to the game environment.

Uploaded by

nafad12153
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

// ==UserScript==

// @name TQGV Clan Name - Rainbow Colors

// @namespace http://tampermonkey.net/

// @version 1.2

// @description Rainbow colors for each character in the name

// @author ceborix + venture + Gemini

// @match kour.io

// @grant none

// ==/UserScript==

(function() {

'use strict';

var fullNickname = "SAYGEX";

var rainbowColors = [

[255, 0, 0],

[255, 127, 0],

[255, 255, 0],

[0, 255, 0],

[0, 0, 255],

[75, 0, 130],

[143, 0, 255]

];

var intervalId = null;

function toHex(c) {

var hex = c.toString(16);


return hex.length === 1 ? "0" + hex : hex;

function changeColor() {

if (typeof unityInstance !== 'undefined') {

var coloredNickname = "";

for (var i = 0; i < fullNickname.length; i++) {

var char = fullNickname[i];

var colorIndex = i % rainbowColors.length;

var r = rainbowColors[colorIndex][0];

var g = rainbowColors[colorIndex][1];

var b = rainbowColors[colorIndex][2];

var hexColor = "#" + toHex(r) + toHex(g) + toHex(b);

coloredNickname += "<color=" + hexColor + ">" + char + "</color>";

unityInstance.SendMessage("MapScripts", "SetNickname", coloredNickname);

if (intervalId !== null) {

clearInterval(intervalId);

intervalId = setInterval(changeColor, 140);

})();// ==UserScript==

// @name Gradient Static Nickname

// @namespace http://tampermonkey.net/
// @version 1.0

// @description Gradient static nickname

// @author

// @match https://kour.io/*

// @grant none

// ==/UserScript==

(function () {

'use strict';

const nicknameText = "SAYGEX";

const gradientColors = [

"#ff0000",

"#ff6600",

"#ffcc00",

"#66cc00",

"#0099ff",

"#6600cc"

];

function applyGradient(text, colors) {

let result = "";

for (let i = 0; i < text.length; i++) {

let color = colors[i % colors.length];

result += `<color=${color}>${text[i]}</color>`;

return result;

}
function setStaticNickname() {

if (typeof unityInstance !== 'undefined') {

const styledName = applyGradient(nicknameText, gradientColors);

unityInstance.SendMessage("MapScripts", "SetNickname", styledName);

setTimeout(setStaticNickname, 1000);

})();

You might also like