Last active
February 18, 2022 07:57
-
-
Save DavidRockin/3b503c38be39e9119cf88bd53b9cb5f0 to your computer and use it in GitHub Desktop.
dave t's branch sex mod lmao
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Dave T's Branch Sex Mod | |
| * | |
| * KEK. copy paste this crap into ur console, then to do some fuggin | |
| * just click on another marble. to make it stop, just click yourself lmao | |
| * | |
| * v2.0: add new control button to change direction, speed, or toggle on/off | |
| * | |
| * @author Dave T. | |
| * @version 2.0 | |
| */ | |
| if (typeof tmrFuck === 'undefined') { tmrFuck = null; } | |
| i = 0, uID = 17, speed = 6, dir = 0b1000, diri = 1, dirs = { 0b1010: 'Left', 0b1000: 'Right', 0b101: 'Top', 0b100: 'Bottom', 0b1111:'Circlejerk' }; | |
| timeForSex = true; | |
| if (typeof wrapper === 'undefined') { | |
| wrapper = null, dropdown = null; | |
| const penis = __BRANCH__.engine.cameraManager.camera._events.followupdate; | |
| if (penis) penis.once = true; | |
| __BRANCH__.engine.on('branch:player:click', (kek) => { | |
| if (kek === __BRANCH__.engine.worldManager.entityManager.getPlayer().userId) { | |
| uID = -1; | |
| return; | |
| } | |
| uID = kek; | |
| }); | |
| wrapper = document.createElement('div'); | |
| wrapper.style.position = 'fixed'; | |
| wrapper.style.marginLeft = '50vw'; | |
| wrapper.style.top = '16px'; | |
| wrapper.style.zIndex = 999999; | |
| document.body.appendChild(wrapper); | |
| const btn = document.createElement('button'); | |
| btn.style.background = '#696969'; | |
| btn.style.color = '#fff'; | |
| btn.style.padding = '9px 16px'; | |
| btn.style.borderRadius = '10px'; | |
| btn.innerText = 'Branch Sex Mod v2 (by Dave T🌲)'; | |
| wrapper.appendChild(btn); | |
| const remDropdown = () => { | |
| dropdown.remove(); | |
| dropdown = null; | |
| }; | |
| btn.addEventListener('click', () => { | |
| if (dropdown !== null) { | |
| return remDropdown(); | |
| } | |
| dropdown = document.createElement('ul'); | |
| dropdown.style.background = '#555'; | |
| dropdown.style.padding = '10px'; | |
| dropdown.style.borderRadius = '10px'; | |
| dropdown.style.position = 'fixed'; | |
| dropdown.style.marginLeft = '50vw'; | |
| dropdown.style.top = `calc(50px)`; | |
| dropdown.style.zIndex = 999999; | |
| dropdown.style.display = 'block'; | |
| document.body.appendChild(dropdown); | |
| const kek = (text, evt) => { | |
| const el = document.createElement('li'); | |
| el.innerText = text; | |
| el.style.color = '#fff'; | |
| el.style.padding = '3px'; | |
| el.addEventListener('click', (e) => { | |
| e.preventDefault(); | |
| return evt(el, el); | |
| }); | |
| dropdown.appendChild(el); | |
| return el; | |
| } | |
| kek('Direction: ' + dirs[dir], (el) => { | |
| diri = (diri + 1) % Object.keys(dirs).length; | |
| dir = parseInt(Object.keys(dirs)[diri]); | |
| el.innerText =`Direction: ${dirs[dir]}`; | |
| }); | |
| kek('Speed: '+speed, (el) => { | |
| speed = Math.max(1, ((speed + 1) % 13)); | |
| el.innerText = `Speed: ${speed}`; | |
| }); | |
| kek(`${timeForSex?'Disable':'Enable'} Sex Mod`, (el) => { | |
| timeForSex = !timeForSex; | |
| el.innerText = `${timeForSex?'Disable':'Enable'} Sex Mod`; | |
| }); | |
| }); | |
| alert('click on a player to do som fuggin kek\nclick on the button on the top to change settings'); | |
| } | |
| if (tmrFuck) clearInterval(tmrFuck); | |
| tmrFuck = setInterval(() => { | |
| if (!timeForSex) return; | |
| i = (i + Math.PI/speed) % (2*Math.PI); | |
| if (uID < 0) return; | |
| const target = __BRANCH__.engine.worldManager.entityManager.getPlayers().find(p => p.userId === uID); | |
| if (!target) return; | |
| const p = __BRANCH__.engine.worldManager.entityManager.player; | |
| offset = (dir === 0b1111 ? 0 : 64); | |
| p.y = target.y + ((dir & 0b100) !== 0 ? (48*Math.sin(i) + offset) * ((dir & 0b01)!==0 ? -1: 1) : 0); | |
| p.x = target.x + ((dir & 0b1000) !== 0 ? (48*Math.cos(i) + offset) * ((dir & 0b10)!==0 ? -1: 1) : 0); | |
| p.setFaceAngleLocation(target); | |
| p.tryMove(); | |
| }, 20); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment