π±οΈClickTP
This mod was created by @Blackhole927.
Source Code (V1.0.0)
ClickTP.js (Click Link to Download)
// gimhook: {"name":"ClickTP","description":"A mod that lets you teleport to where you shift-click!","version":"1.0.0","author":"Blackhole927","license":"MIT"}
(() => {
gimhook.addHook("join", () => {
console.log("Game joined!")
console.log("Test...")
var w = 0
var h = 0
var clickTPon = false;
onmousemove = function(e) {
w = window.innerWidth
h = window.innerHeight
mouseX = e.clientX
mouseY = e.clientY
mouseX -= w/2
mouseX = mouseX/(w)
mouseY -= h/2
mouseY = mouseY/h
zoom = gimhook.graphics.camera.getZoom()
zoom = 1/zoom
mouseX *= zoom
mouseY *= zoom
mouseX *= 2
mouseY *= 2
}
onmousedown = function(e) {
if (e.shiftKey) {
xy = gimhook.graphics.player.getPosition()
xy["x"] += mouseX*(w/2)
xy["y"] += mouseY*(h/2)
}
gimhook.graphics.player.setPosition(xy["x"], xy["y"])
}
});
})();How to Use It
After installing the mod, hold down SHIFT while clicking with your mouse. You will move in the direction of your mouse.
Changelog
Version
Changes
v1.0.0
Added shift-click teleportation functionality.
Last updated