Code:
GameSettings.user.cosmetics.head = {
classname: "cap",
script: GameInventoryManager && GameInventoryManager.register("cap", class e extends GameInventoryManager.HeadClass {
constructor() {
super(),
this.drawAngle = 0,
this.createVersion()
}
versions = {};
versionName = "";
dirty = !0;
getVersions() {
return this.versions
}
cache(e) {
var r = this.versions[this.versionName];
r.dirty = !1;
var a = 115*(e=Math.max(e,1))*.17,s=112*e*.17,
u = r.canvas;u.width=a,
u.height=s;
var v=u.getContext("2d"),
l=.17*e;
v.save(),
v.scale(l,l),
v.fillStyle = "#ffffff00";
v.lineCap = "round";
v.lineWidth = 11.5;
v.beginPath(),
v.arc(44, 50.5, 29.5, 0, 2 * Math.PI),
v.moveTo(15,54),
v.lineTo(100, 38.5),
v.fill(),
v.stroke()
}
setDirty=function(){
this.versions[this.versionName].dirty=!0
}
getBaseWidth=function(){
return 115
}
getBaseHeight=function(){
return 112
}
getDrawOffsetX=function(){
return 2.2
}
getDrawOffsetY=function(){
return 1
}
getScale=function(){
return .17
}
}),
type: "1"
}
Top Hat
Code:
GameSettings.user.cosmetics.head = {
classname: "hat",
script: GameInventoryManager.register("hat", class e extends GameInventoryManager.HeadClass {
constructor() {
super(),
this.versions = {},
this.createVersion()
}
getVersions() {
return this.versions
}
cache(e) {
var r = this.versions[this.versionName];
r.dirty = !1;
var a = 115*(e=Math.max(e,1))*.17,s=112*e*.17,
u = r.canvas;
u.width=a,
u.height=s;
var v=u.getContext("2d"),
l=.17*e;
v.scale(l,l),
v.lineCap = "round";
v.lineWidth = 11.5;
v.beginPath(),
v.arc(70, 75, 29.5, 0, 2 * Math.PI),
v.moveTo(20, 70),
v.lineTo(45, 65),
v.moveTo(87, 55),
v.lineTo(109, 49),
v.stroke(),
v.fillStyle = "#000000",
v.lineCap = "square"
v.beginPath(),
v.moveTo(40, 60),
v.lineTo(21, 21),
v.lineTo(89, 7),
v.lineTo(90, 50),
v.closePath(),
v.fill(),
v.stroke()
}
setDirty(){
this.versions[this.versionName].dirty=!0
}
getBaseWidth(){
return 115
}
getBaseHeight(){
return 112
}
getDrawOffsetX(){
return -2.5
}
getDrawOffsetY(){
return -3.5
}
getScale(){
return .17
}
}),
type: "1"
}
Pumpkin Head
Code:
GameSettings.user.cosmetics.head = {
classname: "pumpkin",
script: GameInventoryManager.register("pumpkin", class e extends GameInventoryManager.HeadClass {
constructor() {
super(),
this.versions = {},
this.createVersion(),
this.img = new Image(90, 90),
this.img.src = "https://imgur.com/UaBzAeL.png"
}
getVersions() {
return this.versions
}
cache(e) {
var r = this.versions[this.versionName];
r.dirty = !1;
var a = 115*(e=Math.max(e,1))*.17,s=112*e*.17,
u = r.canvas;
u.width=a,
u.height=s;
var v=u.getContext("2d"),
l=.31*e;
v.scale(l,l),
this.img.onload = () => {
v.drawImage(this.img, 0, 0);
}
v.drawImage(this.img, 0, 0);
}
setDirty(){
this.versions[this.versionName].dirty=!0
}
getBaseWidth(){
return 115
}
getBaseHeight(){
return 112
}
getDrawOffsetX(){
return -3.5
}
getDrawOffsetY(){
return -1.5
}
getScale(){
return .17
}
}),
type: "1"
}