Code:
GameSettings.user.cosmetics.head = {
classname: "hat",
script: GameInventoryManager.register("hat", class e extends GameInventoryManager.HeadClass {
versions = {}
constructor() {
super(),
this.createVersion()
}
getVersions() { return this.versions }
cache(e) {
let r = this.versions[this.versionName];
r.dirty = !1;
let a = 115 * (e = Math.max(e, 1)) * .17, s = 112 * e * .17,
u = r.canvas;
u.width = a,
u.height = s;
let 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()
}
getBaseWidth() { return 115 }
getBaseHeight() { return 112 }
getDrawOffsetX() { return -2.5 }
getDrawOffsetY() { return -3.5 }
getScale() { return .17 }
})
}