Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name Use Any Name
- // @description It can be any length & can include Unicode. BUT ONLY YOU CAN SEE IT. Everyone else will see your normal name.
- // @include http://tagpro-*.koalabeast.com:*
- // @include http://tangent.jukejuice.com:*
- // @include http://*.newcompte.fr:*
- // @author You!
- // @version 0.1.0
- // @grant none
- // ==/UserScript==
- tagpro.ready(function() {
- var name = '🎅ABCD-1234567890-DCBA🎅';
- var tr = tagpro.renderer;
- tr.veryPrettyText = function (text, color) {
- /* Returns a tagpro style sprite PIXI object rendered from canvas. It's very cute. Like baby sloth cute.
- * @param text {string} The text to initially set it to.
- * @param color {string} The color to render the text.
- * */
- var canvas = document.createElement("canvas");
- canvas.width = 256;
- canvas.height = 32;
- var context = canvas.getContext("2d");
- context.clearRect(0, 0, canvas.width, canvas.height);
- context.font = "bold 11px arial";
- context.fillStyle = color || "#ffffff";
- context.strokeStyle = "#000000";
- context.shadowColor = "#000000";
- context.shadowOffsetX = 0;
- context.shadowOffsetY = 0;
- context.lineWidth = 2;
- context.shadowBlur = 10;
- context.strokeText(text, 16, 16);
- context.shadowBlur = 0;
- context.fillText(text, 16, 16);
- var texture = PIXI.Texture.fromCanvas(canvas);
- return new PIXI.Sprite(texture);
- };
- var dN = tr.drawName;
- tr.drawName = function (player, forceRedraw) {
- if (player.id === tagpro.playerId) player.name = name;
- return dN.apply(this, arguments);
- };
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement