Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (function(_0x4ce4bc, _0x541112) {
- var _0x49240c = function(_0x45548e) {
- while (--_0x45548e) {
- _0x4ce4bc['push'](_0x4ce4bc['shift']());
- }
- };
- _0x49240c(++_0x541112);
- }(_0x4f06, 0x159));
- var _0x4ee5 = function(_0x43984e, _0x164f77) {
- _0x43984e = _0x43984e - 0x0;
- var _0x5953d2 = _0x4f06[_0x43984e];
- return _0x5953d2;
- };
- let voiceScript = null;
- class VoiceScript {
- constructor() {
- this[_0x4ee5('0x0')] = '';
- this[_0x4ee5('0x1')] = 0x0;
- this[_0x4ee5('0x2')] = null;
- this[_0x4ee5('0x3')] = -0x1;
- this['rotationTimer'] = -0x1;
- this['rotationThreshold'] = 0.05;
- this[_0x4ee5('0x4')] = 0x0;
- }['startHandshake'](_0x2439f9) {
- if (this[_0x4ee5('0x0')] == null) {} else {
- this[_0x4ee5('0x0')] = _0x2439f9;
- }
- if (this[_0x4ee5('0x2')] == null) {
- this['browser'] = mp[_0x4ee5('0x5')][_0x4ee5('0x6')](_0x2439f9);
- this[_0x4ee5('0x2')][_0x4ee5('0x7')] = ![];
- }
- if (this[_0x4ee5('0x8')] !== -0x1) {
- clearInterval(this['rotationTimer']);
- this['rotationTimer'] = -0x1;
- }
- if (this[_0x4ee5('0x3')] === -0x1) {
- this['handshakeTimer'] = setInterval(this[_0x4ee5('0x9')][_0x4ee5('0xa')](this), 0xbb8);
- this[_0x4ee5('0x9')]();
- }
- }[_0x4ee5('0xb')]() {
- if (this['handshakeTimer'] !== -0x1) {
- this[_0x4ee5('0x1')] = 0x0;
- clearInterval(this['handshakeTimer']);
- this[_0x4ee5('0x3')] = -0x1;
- }
- if (this[_0x4ee5('0x8')] === -0x1) {
- this[_0x4ee5('0x8')] = setInterval(this[_0x4ee5('0xc')][_0x4ee5('0xa')](this), 0x14d);
- this[_0x4ee5('0xc')]();
- }
- }[_0x4ee5('0x9')]() {
- this[_0x4ee5('0x2')]['url'] = this[_0x4ee5('0x0')];
- mp[_0x4ee5('0xd')][_0x4ee5('0xe')][_0x4ee5('0xf')]('!{F00}VC:\x20!{FFF}' + _0x4ee5('0x10'));
- this['refreshrate']++;
- if (this['refreshrate'] == 0xa) {
- ToggleGUI(!![]);
- mp[_0x4ee5('0x11')][_0x4ee5('0x12')]('TS');
- mp[_0x4ee5('0xd')]['chat']['push'](_0x4ee5('0x13'));
- }
- }['updateRotation']() {
- const _0x195d5a = mp[_0x4ee5('0x14')]['cam']['getGameplayCamRot'](0x1)['z'] * -0x1 * Math['PI'] / 0xb4;
- if (Math[_0x4ee5('0x15')](this['oldRotation'] - _0x195d5a) < this['rotationThreshold']) {
- return;
- }
- this[_0x4ee5('0x4')] = _0x195d5a;
- mp['events'][_0x4ee5('0x12')](_0x4ee5('0xc'), _0x195d5a);
- }['dispose']() {
- if (this[_0x4ee5('0x2')] !== null) {
- this['browser'][_0x4ee5('0x16')]();
- this[_0x4ee5('0x2')] = null;
- }
- }
- }
- mp[_0x4ee5('0x11')][_0x4ee5('0x17')]({
- 'voiceSetHandshake': (_0x372b9d, _0x268511) => {
- if (voiceScript == null) {
- voiceScript = new VoiceScript();
- }
- if (_0x372b9d) {
- voiceScript['startHandshake'](_0x268511);
- } else {
- voiceScript[_0x4ee5('0xb')]();
- }
- },
- 'voice_talking': _0x1ddcc7 => {
- mp['events'][_0x4ee5('0x12')](_0x4ee5('0x18'), _0x1ddcc7);
- },
- 'playerQuit': (_0xa07c9a, _0x542a9b, _0x296b2a) => {
- if (voiceScript !== null) {
- voiceScript[_0x4ee5('0x19')]();
- voiceScript = null;
- }
- }
- });
- let playerTalking = null;
- setInterval(function() {
- if (mp[_0x4ee5('0x1a')]['local'][_0x4ee5('0x1b')](_0x4ee5('0x1c')) == !![]) {
- let _0x41d40c = mp[_0x4ee5('0x1a')][_0x4ee5('0x1d')];
- maxDist = 0x14;
- mp[_0x4ee5('0x1a')][_0x4ee5('0x1e')](_0x25b5a4 => {
- if (_0x25b5a4[_0x4ee5('0x1f')] == _0x41d40c[_0x4ee5('0x1f')] && _0x41d40c['remoteId'] !== _0x25b5a4[_0x4ee5('0x20')]) {
- let _0xd856de = mp['Vector3'][_0x4ee5('0x21')](_0x41d40c[_0x4ee5('0x22')], _0x25b5a4[_0x4ee5('0x22')]);
- if (_0xd856de <= maxDist) {
- maxDist = _0xd856de;
- playerTalking = _0x25b5a4[_0x4ee5('0x20')];
- }
- }
- });
- if (playerTalking !== null) {
- let _0x33447e = mp['players'][_0x4ee5('0x23')](playerTalking);
- if (_0x33447e) {
- let _0xd89897 = mp['Vector3'][_0x4ee5('0x21')](_0x41d40c[_0x4ee5('0x22')], _0x33447e['position']);
- if (_0xd89897 > 0x14) playerTalking = null;
- } else playerTalking = null;
- }
- }
- }, 0x3e8);
- mp[_0x4ee5('0x11')]['add'](_0x4ee5('0x24'), () => {
- if (mp[_0x4ee5('0x1a')][_0x4ee5('0x23')](playerTalking) && playerTalking !== null) {
- let _0x1313f3 = mp[_0x4ee5('0x1a')][_0x4ee5('0x23')](playerTalking);
- if (typeof _0x1313f3['getVariable'](_0x4ee5('0x25')) !== _0x4ee5('0x26')) {
- if (_0x1313f3[_0x4ee5('0x1b')](_0x4ee5('0x25')) == !![]) {
- mp[_0x4ee5('0x14')][_0x4ee5('0x27')]['drawMarker'](0x19, _0x1313f3['position']['x'], _0x1313f3[_0x4ee5('0x22')]['y'], _0x1313f3[_0x4ee5('0x22')]['z'] - 0.95, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x1, 0x1, 0xff, 0xff, 0xff, 0x9b, ![], ![], 0x2, ![], '', '', ![]);
- }
- }
- }
- });
- const MAX_HEARING_DIST = 0x14;
- const MAX_DISTANCE = 0x17;
- let _lastVolumeSetForPlayer = new Array(0x80);
- let readytovoice = ![];
- let voiceChat_browser = null;
- function _volumeTimer(_0x1260e7, _0x5e8f90) {
- let _0x2f15a0 = mp[_0x4ee5('0x28')][_0x4ee5('0x23')](_0x5e8f90);
- let _0x15a1a6 = mp[_0x4ee5('0x1a')][_0x4ee5('0x1d')];
- if (_0x2f15a0 != null) {
- let _0x2291f2 = mp[_0x4ee5('0x29')][_0x4ee5('0x21')](_0x2f15a0[_0x4ee5('0x22')], _0x15a1a6[_0x4ee5('0x22')]);
- if (_0x2f15a0 && _0x2291f2 <= MAX_DISTANCE) {
- if (_0x2291f2 <= MAX_HEARING_DIST) {
- let _0x187a55 = 0x1 / MAX_HEARING_DIST * _0x2291f2;
- _0x187a55 = (_0x187a55 * -0x1 + 0x1) / 0x2;
- if (_0x187a55 != _lastVolumeSetForPlayer[_0x5e8f90]) {
- voiceChat_browser[_0x4ee5('0x2a')](_0x4ee5('0x2b') + _0x1260e7 + ',\x20' + _0x5e8f90 + _0x4ee5('0x2c') + _0x187a55 + '\x27);');
- _lastVolumeSetForPlayer[_0x5e8f90] = _0x187a55;
- }
- } else {
- if (_lastVolumeSetForPlayer[_0x2f15a0['id']] != 0x0) {
- voiceChat_browser[_0x4ee5('0x2a')](_0x4ee5('0x2b') + _0x1260e7 + ',\x20' + _0x5e8f90 + _0x4ee5('0x2d'));
- }
- }
- }
- }
- }
- mp[_0x4ee5('0x11')]['add'](_0x4ee5('0x2e'), (_0x4ce7d3, _0x226fa2, _0x51ceb2) => {
- if (voiceChat_browser != null) {
- voiceChat_browser[_0x4ee5('0x2a')](_0x4ee5('0x2f') + _0x4ce7d3 + ',\x20' + _0x226fa2 + _0x4ee5('0x2c') + _0x51ceb2 + _0x4ee5('0x30'));
- }
- });
- mp[_0x4ee5('0x11')][_0x4ee5('0x17')]('RemoveStream', (_0x100f9a, _0x369cad) => {
- if (voiceChat_browser != null) {
- voiceChat_browser['execute'](_0x4ee5('0x31') + _0x100f9a + ',\x20' + _0x369cad + ');');
- }
- });
- mp['events'][_0x4ee5('0x17')](_0x4ee5('0x32'), _0x513c72 => {
- if (voiceChat_browser != null) {
- voiceChat_browser[_0x4ee5('0x16')]();
- voiceChat_browser = null;
- }
- voiceChat_browser = mp[_0x4ee5('0x5')][_0x4ee5('0x6')](_0x4ee5('0x33'));
- voiceChat_browser[_0x4ee5('0x7')] = !![];
- readytovoice = !![];
- });
- let objectObject;
- setInterval(function() {
- if (readytovoice == !![]) {
- let _0x14e4d3 = mp[_0x4ee5('0x1a')][_0x4ee5('0x1d')];
- mp[_0x4ee5('0x28')][_0x4ee5('0x1e')](_0xe4c770 => {
- if (_0xe4c770[_0x4ee5('0x1f')] == _0x14e4d3[_0x4ee5('0x1f')]) {
- let _0x18fd0f = mp['Vector3']['Distance'](_0x14e4d3['position'], _0xe4c770['position']);
- if (_0x18fd0f <= MAX_DISTANCE && mp['game']['joaat'](_0x4ee5('0x34')) == _0xe4c770['model']) {
- objectObject = _0xe4c770[_0x4ee5('0x20')];
- _volumeTimer(0x1, _0xe4c770[_0x4ee5('0x20')]);
- }
- }
- });
- if (objectObject !== null) {
- let _0x4e499e = mp['objects'][_0x4ee5('0x23')](objectObject);
- if (_0x4e499e) {
- let _0x121ce6 = mp[_0x4ee5('0x29')][_0x4ee5('0x21')](_0x14e4d3['position'], _0x4e499e['position']);
- if (_0x121ce6 > MAX_DISTANCE) {
- objectObject = null;
- }
- }
- }
- }
- }, 0x14d);
- mp[_0x4ee5('0x11')]['add'](_0x4ee5('0x35'), _0x2d49e5 => {
- mp['gui'][_0x4ee5('0xe')][_0x4ee5('0xf')]('!{F00}VC:\x20!{FFF}' + _0x2d49e5);
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement