Fun
Fun
using GorillaGameModes;
using GorillaNetworking;
using GorillaTag;
using GorillaTagScripts;
using iiMenu.Classes;
using iiMenu.Menu;
using iiMenu.Mods.Spammers;
using iiMenu.Notifications;
using OVR;
using Photon.Pun;
using Photon.Realtime;
using Photon.Voice.Unity;
using Photon.Voice.Unity.UtilityScripts;
using PlayFab;
using PlayFab.ClientModels;
using POpusCodec.Enums;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using UnityEngine;
using static iiMenu.Classes.RigManager;
using static iiMenu.Menu.Main;
namespace iiMenu.Mods
{
public class Fun
{
public static void FixHead()
{
VRRig.LocalRig.head.trackingRotationOffset.x = 0f;
VRRig.LocalRig.head.trackingRotationOffset.y = 0f;
VRRig.LocalRig.head.trackingRotationOffset.z = 0f;
}
GorillaLocomotion.GTPlayer.Instance.rightControllerTransform.transform.position =
lh;
GorillaLocomotion.GTPlayer.Instance.leftControllerTransform.transform.position =
rh;
GorillaLocomotion.GTPlayer.Instance.rightControllerTransform.transform.rotation =
lhr;
GorillaLocomotion.GTPlayer.Instance.leftControllerTransform.transform.rotation =
rhr;
}
FriendshipGroupDetection.Instance.suppressPartyCreationUntilTimestamp = 0f;
FriendshipGroupDetection.Instance.groupCreateAfterTimestamp = 0f;
List<int> provisionalMembers =
FriendshipGroupDetection.Instance.playersInProvisionalGroup;
if (provisionalMembers.Count > 0)
{
Color targetColor =
GTColor.RandomHSV(FriendshipGroupDetection.Instance.braceletRandomColorHSVRanges);
FriendshipGroupDetection.Instance.myBraceletColor =
targetColor;
FriendshipGroupDetection.Instance.SendPartyFormedRPC(FriendshipGroupDetection.PackC
olor(targetColor), members.ToArray(), false);
RPCProtection();
}
}
}
PhotonNetworkController.Instance.AttemptToJoinSpecificRoom(Important.RandomRoomName
(), GorillaNetworking.JoinType.ForceJoinWithParty);
partyTime = Time.time + 0.25f;
phaseTwo = false;
amountPartying =
FriendshipGroupDetection.Instance.myPartyMemberIDs.Count - 1;
NotifiLib.SendNotification("<color=grey>[</color><color=purple>PARTY</
color><color=grey>]</color> <color=white>Kicking " + amountPartying.ToString() + "
party members, this may take a second...</color>");
}
else
NotifiLib.SendNotification("<color=grey>[</color><color=red>ERROR</
color><color=grey>]</color> <color=white>You are not in a party!</color>");
}
NotifiLib.SendNotification("<color=grey>[</color><color=red>ERROR</
color><color=grey>]</color> <color=white>You are not in a party!</color>");
}
if (ban)
BanAllInParty();
else
KickAllInParty();
CoroutineManager.EndCoroutine(thisCoroutine);
}
lastPartyKickThingy = FriendshipGroupDetection.Instance.IsInParty;
}
lastPartyKickThingy = FriendshipGroupDetection.Instance.IsInParty;
}
if (GetGunInput(true))
{
VRRig.LocalRig.enabled = false;
VRRig.LocalRig.transform.position =
NewPointer.transform.position - new Vector3(0, 1, 0);
if (Time.time > splashDel)
{
if (!isBoopLeft)
isBoopLeft = D1 < threshold;
if (!isBoopRight)
isBoopRight = D2 < threshold;
}
}
if (isBoopLeft && !lastlhboop)
{
if (PhotonNetwork.InRoom)
{
GorillaTagger.Instance.myVRRig.SendRPC("RPC_PlayHandTap",
RpcTarget.All, new object[]{
sound,
true,
999999f
});
RPCProtection();
}
else
VRRig.LocalRig.PlayHandTapLocal(sound, true, 999999f);
}
if (isBoopRight && !lastrhboop)
{
if (PhotonNetwork.InRoom)
{
GorillaTagger.Instance.myVRRig.SendRPC("RPC_PlayHandTap",
RpcTarget.All, new object[]{
sound,
false,
999999f
});
RPCProtection();
}
else
VRRig.LocalRig.PlayHandTapLocal(sound, false, 999999f);
}
lastlhboop = isBoopLeft;
lastrhboop = isBoopRight;
}
NotifiLib.SendNotification("<color=grey>[</color><color=purple>KEYLOGS</
color><color=grey>]</color> " + (string)keylog[1], 5000);
keyLogs.Remove(keylog);
}
}
}
}
RPCProtection();
tapDelay = Time.time + 0.1f;
}
}
}
if (rightGrab)
{
SetBraceletState(state, false);
SetBraceletState(false, true);
}
if (leftGrab || rightGrab)
RPCProtection();
}
VRRig.LocalRig.nonCosmeticRightHandItem.EnableItem(true);
}
List<Color> rgbColors = new List<Color> { };
for (int i=0; i<10; i++)
rgbColors.Add(Color.HSVToRGB(((Time.frameCount / 180f) + (i / 10f))
% 1f, 1f, 1f));
VRRig.LocalRig.reliableState.isBraceletLeftHanded = false;
VRRig.LocalRig.reliableState.braceletSelfIndex = 99;
VRRig.LocalRig.reliableState.braceletBeadColors = rgbColors;
VRRig.LocalRig.friendshipBraceletRightHand.UpdateBeads(rgbColors, 99);
}
VRRig.LocalRig.nonCosmeticRightHandItem.EnableItem(false);
}
VRRig.LocalRig.reliableState.isBraceletLeftHanded = false;
VRRig.LocalRig.reliableState.braceletSelfIndex = 0;
VRRig.LocalRig.reliableState.braceletBeadColors.Clear();
VRRig.LocalRig.UpdateFriendshipBracelet();
}
GhostReactorManager.instance.gameEntityManager.RequestGrabEntity(entity.id, false,
Vector3.zero, Quaternion.identity);
}
}
}
}
else
{
VRRig.LocalRig.enabled = true;
}
}
GhostReactorManager.instance.ToolPurchaseStationRequest(UnityEngine.Random.Range(0,
GhostReactorManager.instance.reactor.toolPurchasingStations.Count - 1),
GhostReactorManager.ToolPurchaseStationAction.TryPurchase);
purchaseDelay = Time.time + 0.1f;
}
}
if (GetGunInput(true))
{
VRRig gunTarget = Ray.collider.GetComponentInParent<VRRig>();
if (gunTarget && !PlayerIsLocal(gunTarget))
{
if (PhotonNetwork.LocalPlayer.IsMasterClient)
GRPlayer.Get(GetPlayerFromVRRig(gunTarget).ActorNumber).currency = currency;
else
NotifiLib.SendNotification("<color=grey>[</color><color=red>ERROR</
color><color=grey>]</color> <color=white>You are not master client.</color>");
}
}
}
}
if (GetGunInput(true))
{
VRRig gunTarget = Ray.collider.GetComponentInParent<VRRig>();
if (gunTarget && !PlayerIsLocal(gunTarget))
{
if (PhotonNetwork.LocalPlayer.IsMasterClient)
GRPlayer.Get(GetPlayerFromVRRig(gunTarget).ActorNumber).currency = 0;
else
NotifiLib.SendNotification("<color=grey>[</color><color=red>ERROR</
color><color=grey>]</color> <color=white>You are not master client.</color>");
}
}
}
}
if (plr.State == GRPlayer.GRPlayerState.Ghost)
GhostReactorManager.instance.RequestPlayerStateChange(plr,
GRPlayer.GRPlayerState.Alive);
plr.hp = plr.maxHp;
}
if (GRPlayer.State == State)
return;
if (!NetworkSystem.Instance.IsMasterClient)
{ NotifiLib.SendNotification("<color=grey>[</color><color=red>ERROR</
color><color=grey>]</color> <color=white>You are not master client.</color>");
return; }
if (State == GRPlayer.GRPlayerState.Ghost)
CoroutineManager.instance.StartCoroutine(KillTarget(Target));
}
int netId =
GhostReactorManager.instance.gameEntityManager.CreateNetId();
GhostReactorManager.instance.gameEntityManager.photonView.RPC("CreateItemRPC",
Target, new object[]
{
new int[] { netId },
new int[] { (int)GTZone.ghostReactor },
new int[] { 48354877 },
new long[]
{ BitPackUtils.PackWorldPosForNetwork(Rig.transform.position) },
new int[]
{ BitPackUtils.PackQuaternionForNetwork(Rig.transform.rotation) },
new long[] { 0L }
});
GhostReactorManager.instance.gameAgentManager.photonView.RPC("ApplyBehaviorRPC",
Target, new object[]
{
new int[] { netId },
new byte[] { 6 }
});
GRPlayer.ChangePlayerState(GRPlayer.GRPlayerState.Ghost,
GhostReactorManager.instance);
RPCProtection();
RPCProtection();
}
if (GetGunInput(true))
{
VRRig gunTarget = Ray.collider.GetComponentInParent<VRRig>();
if (gunTarget && !PlayerIsLocal(gunTarget))
SetPlayerState(gunTarget, (GRPlayer.GRPlayerState)state);
}
}
}
if (GetGunInput(true))
{
VRRig gunTarget = Ray.collider.GetComponentInParent<VRRig>();
if (gunTarget && !PlayerIsLocal(gunTarget) && Time.time >
killDelay)
{
killDelay = Time.time + 0.1f;
GRPlayer plr =
GRPlayer.Get(GetPlayerFromVRRig(gunTarget).ActorNumber);
SetPlayerState(gunTarget, plr.State ==
GRPlayer.GRPlayerState.Alive ? GRPlayer.GRPlayerState.Ghost :
GRPlayer.GRPlayerState.Alive);
}
}
}
}
GhostReactorManager.instance.ToolPurchaseStationRequest(UnityEngine.Random.Range(0,
GhostReactorManager.instance.reactor.toolPurchasingStations.Count - 1),
(GhostReactorManager.ToolPurchaseStationAction)UnityEngine.Random.Range(0, 2));
purchaseDelay = Time.time + 0.1f;
}
}
mic.RestartRecording(true);
}
if (amplify)
{
MicAmplifier microphoneAmplifier =
mic.gameObject.GetOrAddComponent<MicAmplifier>();
microphoneAmplifier.AmplificationFactor = 16;
microphoneAmplifier.BoostValue = 16;
} else
{
if (mic.gameObject.GetComponent<MicAmplifier>())
UnityEngine.Object.Destroy(mic.gameObject.GetComponent<MicAmplifier>());
}
mic.RestartRecording(true);
}
if (GetGunInput(true))
{
GameObject.Find(objectName).transform.position =
NewPointer.transform.position + new Vector3(0f, 1f, 0f);
}
}
}
if (GetGunInput(true))
{
foreach (GliderHoldable glider in GetAllType<GliderHoldable>())
{
if (glider.GetView.Owner == PhotonNetwork.LocalPlayer)
{
glider.gameObject.transform.position =
NewPointer.transform.position + new Vector3(0f, 1f, 0f);
} else
{
glider.OnHover(null, null);
}
}
}
}
}
if (GetGunInput(true))
{
RequestCreatePiece(pieceIdSet, NewPointer.transform.position +
new Vector3(0f, 1f, 0f), Quaternion.identity, 0);
RPCProtection();
}
}
}
if (GetGunInput(true))
{
BuilderPiece gunTarget =
Ray.collider.GetComponentInParent<BuilderPiece>();
if (gunTarget && Time.time > gbgd)
{
gbgd = Time.time + 0.1f;
pieceIdSet = gunTarget.pieceType;
NotifiLib.SendNotification("<color=grey>[</color><color=green>SUCCESS</
color><color=grey>]</color> Successfully selected piece " +
gunTarget.name.Replace("(Clone)", "") + "!");
RPCProtection();
}
}
}
}
VRRig.LocalRig.transform.position =
GorillaTagger.Instance.bodyCollider.transform.position + new Vector3(0f, 0.15f,
0f);
VRRig.LocalRig.transform.rotation =
GorillaTagger.Instance.bodyCollider.transform.rotation;
VRRig.LocalRig.head.rigTarget.transform.rotation =
GorillaTagger.Instance.headCollider.transform.rotation;
VRRig.LocalRig.leftHand.rigTarget.transform.position =
VRRig.LocalRig.transform.position + VRRig.LocalRig.transform.TransformDirection(
new Vector3(-0.0436f, -0.3f, -0.1563f)
);
VRRig.LocalRig.rightHand.rigTarget.transform.position =
VRRig.LocalRig.transform.position + VRRig.LocalRig.transform.TransformDirection(
new Vector3(-0.0072f, -0.2964f, -0.1563f)
);
VRRig.LocalRig.leftHand.rigTarget.transform.rotation =
VRRig.LocalRig.transform.rotation * Quaternion.Euler(330f, 344.5f, 0f);
VRRig.LocalRig.rightHand.rigTarget.transform.rotation =
VRRig.LocalRig.transform.rotation * Quaternion.Euler(340f, 165.5f, 160f);
VRRig.LocalRig.leftIndex.calcT = 1f;
VRRig.LocalRig.leftMiddle.calcT = 1f;
VRRig.LocalRig.leftThumb.calcT = 1f;
VRRig.LocalRig.leftIndex.LerpFinger(1f, false);
VRRig.LocalRig.leftMiddle.LerpFinger(1f, false);
VRRig.LocalRig.leftThumb.LerpFinger(1f, false);
VRRig.LocalRig.rightIndex.calcT = 1f;
VRRig.LocalRig.rightMiddle.calcT = 1f;
VRRig.LocalRig.rightThumb.calcT = 1f;
VRRig.LocalRig.rightIndex.LerpFinger(1f, false);
VRRig.LocalRig.rightMiddle.LerpFinger(1f, false);
VRRig.LocalRig.rightThumb.LerpFinger(1f, false);
GrowingSnowballThrowable LeftHandSnowball =
GetProjectile("GrowingSnowballLeftAnchor") as GrowingSnowballThrowable;
if (!LeftHandSnowball.gameObject.activeSelf)
{
LeftHandSnowball.SetSnowballActiveLocal(true);
LeftHandSnowball.SetSizeLevelAuthority(3);
VRRig.LocalRig.SetThrowableProjectileColor(true,
VRRig.LocalRig.playerColor);
LeftHandSnowball.ApplyColor(VRRig.LocalRig.playerColor);
}
GrowingSnowballThrowable RightHandSnowball =
GetProjectile("GrowingSnowballRightAnchor") as GrowingSnowballThrowable;
if (!RightHandSnowball.gameObject.activeSelf)
{
RightHandSnowball.SetSnowballActiveLocal(true);
RightHandSnowball.SetSizeLevelAuthority(3);
VRRig.LocalRig.SetThrowableProjectileColor(false,
VRRig.LocalRig.playerColor);
RightHandSnowball.ApplyColor(VRRig.LocalRig.playerColor);
}
}
VRRig.LocalRig.transform.position =
GorillaTagger.Instance.bodyCollider.transform.position + new Vector3(0f, 0.15f,
0f);
VRRig.LocalRig.transform.rotation =
GorillaTagger.Instance.bodyCollider.transform.rotation;
VRRig.LocalRig.head.rigTarget.transform.rotation =
GorillaTagger.Instance.headCollider.transform.rotation;
VRRig.LocalRig.leftHand.rigTarget.transform.position =
VRRig.LocalRig.transform.position + VRRig.LocalRig.transform.TransformDirection(
new Vector3(-0.08f, -0.0691f, 0f)
);
VRRig.LocalRig.rightHand.rigTarget.transform.position =
VRRig.LocalRig.transform.position + VRRig.LocalRig.transform.TransformDirection(
new Vector3(-0.0073f, -0.2182f, 0.0164f)
);
VRRig.LocalRig.leftHand.rigTarget.transform.rotation =
VRRig.LocalRig.transform.rotation * Quaternion.Euler(350f, 140f, 62f);
VRRig.LocalRig.rightHand.rigTarget.transform.rotation =
VRRig.LocalRig.transform.rotation * Quaternion.Euler(8f, 30f, 8f);
VRRig.LocalRig.leftIndex.calcT = 1f;
VRRig.LocalRig.leftMiddle.calcT = 1f;
VRRig.LocalRig.leftThumb.calcT = 1f;
VRRig.LocalRig.leftIndex.LerpFinger(1f, false);
VRRig.LocalRig.leftMiddle.LerpFinger(1f, false);
VRRig.LocalRig.leftThumb.LerpFinger(1f, false);
VRRig.LocalRig.rightIndex.calcT = 1f;
VRRig.LocalRig.rightMiddle.calcT = 1f;
VRRig.LocalRig.rightThumb.calcT = 1f;
VRRig.LocalRig.rightIndex.LerpFinger(1f, false);
VRRig.LocalRig.rightMiddle.LerpFinger(1f, false);
VRRig.LocalRig.rightThumb.LerpFinger(1f, false);
GrowingSnowballThrowable LeftHandSnowball =
GetProjectile("GrowingSnowballLeftAnchor") as GrowingSnowballThrowable;
if (!LeftHandSnowball.gameObject.activeSelf)
{
LeftHandSnowball.SetSnowballActiveLocal(true);
LeftHandSnowball.IncreaseSize(3);
VRRig.LocalRig.SetThrowableProjectileColor(true,
VRRig.LocalRig.playerColor);
LeftHandSnowball.ApplyColor(VRRig.LocalRig.playerColor);
}
GrowingSnowballThrowable RightHandSnowball =
GetProjectile("GrowingSnowballRightAnchor") as GrowingSnowballThrowable;
if (!RightHandSnowball.gameObject.activeSelf)
{
RightHandSnowball.SetSnowballActiveLocal(true);
RightHandSnowball.IncreaseSize(3);
VRRig.LocalRig.SetThrowableProjectileColor(false,
VRRig.LocalRig.playerColor);
RightHandSnowball.ApplyColor(VRRig.LocalRig.playerColor);
}
}
GetProjectile("GrowingSnowballLeftAnchor").SetSnowballActiveLocal(false);
GetProjectile("GrowingSnowballRightAnchor").SetSnowballActiveLocal(false);
}
GorillaLocomotion.GTPlayer.Instance.SetHoverAllowed(true);
GorillaLocomotion.GTPlayer.Instance.SetHoverActive(true);
VRRig.LocalRig.hoverboardVisual.gameObject.SetActive(true);
}
GorillaLocomotion.GTPlayer.Instance.SetHoverAllowed(false);
GorillaLocomotion.GTPlayer.Instance.SetHoverActive(false);
VRRig.LocalRig.hoverboardVisual.gameObject.SetActive(false);
}
FreeHoverboardManager.instance.SendDropBoardRPC(VRRig.LocalRig.transform.position,
VRRig.LocalRig.transform.rotation, Vector3.zero, Vector3.zero, RandomColor());
GorillaLocomotion.GTPlayer.Instance.SetHoverAllowed(true);
}
FreeHoverboardManager.instance.SendDropBoardRPC(GorillaTagger.Instance.rightHandTra
nsform.position, GorillaTagger.Instance.rightHandTransform.rotation,
GorillaTagger.Instance.rightHandTransform.forward * ShootStrength,
RandomVector3(100f), RandomColor());
}
}
offset = -25f;
Vector3 position2 = new Vector3(MathF.Cos(offset +
((float)Time.frameCount / 30)) * 2f, 1f, MathF.Sin(offset + ((float)Time.frameCount
/ 30)) * 2f);
FreeHoverboardManager.instance.SendDropBoardRPC(GorillaTagger.Instance.headCollider
.transform.position + position,
Quaternion.Euler((GorillaTagger.Instance.headCollider.transform.position -
position).normalized), (position2 - position).normalized * 6.5f, new Vector3(0f,
360f, 0f), RandomColor());
offset = 180f;
position = new Vector3(MathF.Cos(offset + ((float)Time.frameCount /
30)) * 2f, 1f, MathF.Sin(offset + ((float)Time.frameCount / 30)) * 2f);
offset = 155f;
position2 = new Vector3(MathF.Cos(offset +
((float)Time.frameCount / 30)) * 2f, 1f, MathF.Sin(offset + ((float)Time.frameCount
/ 30)) * 2f);
FreeHoverboardManager.instance.SendDropBoardRPC(GorillaTagger.Instance.headCollider
.transform.position + position,
Quaternion.Euler((GorillaTagger.Instance.headCollider.transform.position -
position).normalized), (position2 - position).normalized * 6.5f, new Vector3(0f,
360f, 0f), RandomColor());
}
}
VRRig.LocalRig.hoverboardVisual.SetIsHeld(VRRig.LocalRig.hoverboardVisual.IsLeftHan
ded, VRRig.LocalRig.hoverboardVisual.NominalLocalPosition,
VRRig.LocalRig.hoverboardVisual.NominalLocalRotation, rgbColor);
}
}
VRRig.LocalRig.hoverboardVisual.SetIsHeld(VRRig.LocalRig.hoverboardVisual.IsLeftHan
ded, VRRig.LocalRig.hoverboardVisual.NominalLocalPosition,
VRRig.LocalRig.hoverboardVisual.NominalLocalRotation, rgbColor);
}
}
VRRig.LocalRig.hoverboardVisual.SetIsHeld(VRRig.LocalRig.hoverboardVisual.IsLeftHan
ded, VRRig.LocalRig.hoverboardVisual.NominalLocalPosition,
VRRig.LocalRig.hoverboardVisual.NominalLocalRotation, RandomColor());
}
NotifiLib.SendNotification("<color=grey>[</color><color=red>ERROR</
color><color=grey>]</color> <color=white>You are not master client.</color>");
yield break;
}
isFiring = true;
if (!File.Exists("iisStupidMenu/shotgun.wav"))
LoadSoundFromURL("https://github.com/iiDk-the-actual/ModInfo/raw/refs/heads/main/
shotgun.wav", "shotgun.wav");
Sound.PlayAudio("shotgun.wav");
if (GetGunInput(true))
{
BuilderPiece gunTarget =
Ray.collider.GetComponentInParent<BuilderPiece>();
if (gunTarget)
{
GetBuilderTable().RequestRecyclePiece(gunTarget, true, 2);
RPCProtection();
}
}
}
//RPCProtection();
}
GetBuilderTable().builderNetworking.photonView.RPC("PieceCreatedByShelfRPC",
RpcTarget.All, new object[]
{
pieceType,
pieceId,
BitPackUtils.PackWorldPosForNetwork(position),
BitPackUtils.PackQuaternionForNetwork(rotation),
materialType,
(byte)4,
1,
PhotonNetwork.LocalPlayer
});
} else
NotifiLib.SendNotification("<color=grey>[</color><color=red>ERROR</
color><color=grey>]</color> <color=white>You are not master client.</color>");
}
GameObject.Find(objectName).GetComponent<ThrowableBug>().allowPlayerStealing =
allowPlayerStealing;
Patches.CreatePatch.enabled = true;
Patches.CreatePatch.pieceTypeSearch = pieceType;
yield return null;
target = GetBuilderTable().GetPiece(pieceId);
pieceId = -1;
Patches.CreatePatch.enabled = false;
Patches.CreatePatch.pieceTypeSearch = 0;
onComplete?.Invoke(target); // so bad
}
NotifiLib.SendNotification("<color=grey>[</color><color=red>ERROR</
color><color=grey>]</color> <color=white>You are not master client.</color>");
yield break;
}
BuilderPieceInteractor.instance.handState[1] =
BuilderPieceInteractor.HandState.Empty;
BuilderPieceInteractor.instance.heldPiece[1] = null;
yield return null;
});
while (base2a == null)
{
yield return null;
}
});
while (slopea == null)
{
yield return null;
}
GetBuilderTable().RequestGrabPiece(connectorthinga, false,
Vector3.zero, Quaternion.identity);
yield return null;
GetBuilderTable().RequestPlacePiece(flatthingb, flatthinga, -1, 1, 3,
connectorthinga, 1, 0);
yield return null;
GetBuilderTable().RequestGrabPiece(connectorthingb, false,
Vector3.zero, Quaternion.identity);
yield return null;
GetBuilderTable().RequestPlacePiece(connectorthinga, connectorthinga, -
1, 0, 1, connectorthingb, 1, 0);
yield return null;
GetBuilderTable().RequestGrabPiece(connectorthingc, false,
Vector3.zero, Quaternion.identity);
yield return null;
GetBuilderTable().RequestPlacePiece(connectorthingb, connectorthinga,
0, 0, 1, connectorthingc, 1, 0);
yield return null;
lastgripcrap = rightGrab;
lasttrigcrap = rightTrigger > 0.5f;
}
VRRig.LocalRig.sizeManager.currentSizeLayerMaskValue = 13;
}
lastgripcrap = rightGrab;
}
if (rightGrab)
VRRig.LocalRig.sizeManager.currentSizeLayerMaskValue = 2;
}
if (GetGunInput(true))
{
foreach (MonkeyeAI monkeyeAI in GetAllType<MonkeyeAI>())
{
if (!NetworkSystem.Instance.IsMasterClient)
{ NotifiLib.SendNotification("<color=grey>[</color><color=red>ERROR</
color><color=grey>]</color> <color=white>You are not master client.</color>");
return; }
monkeyeAI.gameObject.transform.position =
NewPointer.transform.position + new Vector3(0f, 1f, 0f);
}
}
}
}
return blocks;
}
potentialgrabbedpieces.Clear();
RPCProtection();
}
}
index++;
}
}
if (GetGunInput(true))
{
foreach (BalloonHoldable balloon in
GetAllType<BalloonHoldable>())
{
if (balloon.ownerRig == VRRig.LocalRig)
balloon.gameObject.transform.position =
NewPointer.transform.position + new Vector3(0f, 1f, 0f);
else
balloon.WorldShareableRequestOwnership();
}
}
}
}
Balloon.maxDistanceFromOwner = float.MaxValue;
Balloon.currentState =
TransferrableObject.PositionState.Dropped;
Balloon.gameObject.transform.position =
GorillaTagger.Instance.headCollider.transform.position +
(GorillaTagger.Instance.headCollider.transform.up * - 1f);
Balloon.gameObject.transform.rotation =
GorillaTagger.Instance.headCollider.transform.rotation;
}
}
if (!FoundBalloon)
{
CosmeticsController.instance.ApplyCosmeticItemToSet(VRRig.LocalRig.tryOnSet,
CosmeticsController.instance.GetItemFromDict("LMAAP."), true, false);
CosmeticsController.instance.UpdateWornCosmetics(true);
RPCProtection();
ClearType<BalloonHoldable>();
}
}
else
{
if (!VRRig.LocalRig.enabled)
VRRig.LocalRig.enabled = true;
}
}
ChangeName(names[nameCycleIndex]);
nameCycleDelay = Time.time + 1f;
}
}
ChangeColor(colors[colorChangeType]);
}
}
switch (hat)
{
case 1:
GameObject.Find("Environment
Objects/LocalObjects_Prefab/TreeRoom/TreeRoomInteractables/UI/Wardrobe/
WardrobeItemButton")
.GetComponent<GorillaPressableButton>().ButtonActivatio
nWithHand(false);
break;
case 2:
GameObject.Find("Environment
Objects/LocalObjects_Prefab/TreeRoom/TreeRoomInteractables/UI/Wardrobe/
WardrobeItemButton (1)")
.GetComponent<GorillaPressableButton>().ButtonActivatio
nWithHand(false);
break;
case 3:
GameObject.Find("Environment
Objects/LocalObjects_Prefab/TreeRoom/TreeRoomInteractables/UI/Wardrobe/
WardrobeItemButton (2)")
.GetComponent<GorillaPressableButton>().ButtonActivatio
nWithHand(false);
break;
}
}
lastHitL = leftGrab;
if (rightGrab && !lastHitR)
{
hat++;
if (hat > 3)
hat = 1;
switch (hat)
{
case 1:
GameObject.Find("Environment
Objects/LocalObjects_Prefab/TreeRoom/TreeRoomInteractables/UI/Wardrobe/
WardrobeItemButton").GetComponent<GorillaPressableButton>().ButtonActivationWithHan
d(false);
break;
case 2:
GameObject.Find("Environment
Objects/LocalObjects_Prefab/TreeRoom/TreeRoomInteractables/UI/Wardrobe/
WardrobeItemButton
(1)").GetComponent<GorillaPressableButton>().ButtonActivationWithHand(false);
break;
case 3:
GameObject.Find("Environment
Objects/LocalObjects_Prefab/TreeRoom/TreeRoomInteractables/UI/Wardrobe/
WardrobeItemButton
(2)").GetComponent<GorillaPressableButton>().ButtonActivationWithHand(false);
break;
}
}
lastHitR = rightGrab;
if (leftPrimary && !lastHitLP)
{
GameObject.Find("Environment
Objects/LocalObjects_Prefab/TreeRoom/TreeRoomInteractables/UI/Wardrobe/
WardrobeLeftButton").GetComponent<WardrobeFunctionButton>().ButtonActivation();
switch (hat)
{
case 1:
GameObject.Find("Environment
Objects/LocalObjects_Prefab/TreeRoom/TreeRoomInteractables/UI/Wardrobe/
WardrobeItemButton").GetComponent<GorillaPressableButton>().ButtonActivationWithHan
d(false);
break;
case 2:
GameObject.Find("Environment
Objects/LocalObjects_Prefab/TreeRoom/TreeRoomInteractables/UI/Wardrobe/
WardrobeItemButton
(1)").GetComponent<GorillaPressableButton>().ButtonActivationWithHand(false);
break;
case 3:
GameObject.Find("Environment
Objects/LocalObjects_Prefab/TreeRoom/TreeRoomInteractables/UI/Wardrobe/
WardrobeItemButton
(2)").GetComponent<GorillaPressableButton>().ButtonActivationWithHand(false);
break;
}
}
lastHitLP = leftPrimary;
switch (accessoryType)
{
case 1:
GameObject.Find("Environment
Objects/LocalObjects_Prefab/TreeRoom/TreeRoomInteractables/UI/Wardrobe/
WardobeHatButton").GetComponent<WardrobeFunctionButton>().ButtonActivation();
break;
case 2:
GameObject.Find("Environment
Objects/LocalObjects_Prefab/TreeRoom/TreeRoomInteractables/UI/Wardrobe/
WardrobeFaceButton").GetComponent<WardrobeFunctionButton>().ButtonActivation();
break;
case 3:
GameObject.Find("Environment
Objects/LocalObjects_Prefab/TreeRoom/TreeRoomInteractables/UI/Wardrobe/
WardrobeBadgeButton").GetComponent<WardrobeFunctionButton>().ButtonActivation();
break;
case 4:
GameObject.Find("Environment
Objects/LocalObjects_Prefab/TreeRoom/TreeRoomInteractables/UI/Wardrobe/
WardrobeHoldableButton").GetComponent<WardrobeFunctionButton>().ButtonActivation();
break;
}
}
lastHitRS = rightSecondary;
}
if (VRRig.LocalRig.inTryOnRoom)
{
CosmeticsController.instance.tryOnSet = new
CosmeticsController.CosmeticSet(holyshit.ToArray(), CosmeticsController.instance);
VRRig.LocalRig.tryOnSet = new
CosmeticsController.CosmeticSet(holyshit.ToArray(), CosmeticsController.instance);
}
else
{
CosmeticsController.instance.currentWornSet = new
CosmeticsController.CosmeticSet(holyshit.ToArray(), CosmeticsController.instance);
VRRig.LocalRig.cosmeticSet = new
CosmeticsController.CosmeticSet(holyshit.ToArray(), CosmeticsController.instance);
}
GorillaTagger.Instance.myVRRig.SendRPC("RPC_UpdateCosmeticsWithTryonPacked",
RpcTarget.All, new object[] { PackCosmetics(holyshit.ToArray()),
PackCosmetics(holyshit.ToArray()) });
RPCProtection();
}
}
}
GorillaTagger.Instance.myVRRig.SendRPC("RPC_UpdateCosmeticsWithTryonPacked",
RpcTarget.All, new object[] { PackCosmetics(holyshit.ToArray()),
PackCosmetics(holyshit.ToArray()) });
RPCProtection();
}
}
}
GorillaTagger.Instance.myVRRig.SendRPC("RPC_UpdateCosmeticsWithTryonPacked",
RpcTarget.All, new object[] { PackCosmetics(Array.Empty<string>()),
CosmeticsController.instance.tryOnSet.ToPackedIDArray() });
RPCProtection();
}
public static void TryOffAnywhere()
{
CosmeticsController.instance.currentWornSet = new
CosmeticsController.CosmeticSet(archiveCosmetics, CosmeticsController.instance);
VRRig.LocalRig.cosmeticSet = new
CosmeticsController.CosmeticSet(archiveCosmetics, CosmeticsController.instance);
GorillaTagger.Instance.myVRRig.SendRPC("RPC_UpdateCosmeticsWithTryon",
RpcTarget.All, new object[] { archiveCosmetics,
CosmeticsController.instance.tryOnSet.ToPackedIDArray() });
RPCProtection();
}
NotifiLib.SendNotification("<color=grey>[</color><color=green>SUCCESS</
color><color=grey>]</color> Item \"" + ToTitleCase(hat.overrideDisplayName) + "\"
has been purchased.");
GorillaTagger.Instance.myVRRig.SendRPC("RPC_UpdateCosmeticsWithTryon",
RpcTarget.Others, new object[] { new string[] { "null", "null", "null", "null",
"null", "null", "null", "null", "null", "null", "null", "null", "null", "null",
"null", "null" }, new string[] { "null", "null", "null", "null", "null", "null",
"null", "null", "null", "null", "null", "null", "null", "null", "null",
"null" } });
RPCProtection();
}
if (lasttagged && !PlayerIsTagged(VRRig.LocalRig))
{
GorillaTagger.Instance.myVRRig.SendRPC("RPC_UpdateCosmeticsWithTryon",
RpcTarget.Others, new object[]
{ CosmeticsController.instance.currentWornSet.ToDisplayNameArray(),
CosmeticsController.instance.tryOnSet.ToDisplayNameArray() });
RPCProtection();
}
lasttagged = PlayerIsTagged(VRRig.LocalRig);
}
NotifiLib.SendNotification("<color=grey>[</color><color=green>SUCCESS</
color><color=grey>]</color> " + id, 5000);
GUIUtility.systemCopyBuffer = id;
}
}
}
}
NotifiLib.SendNotification("<color=grey>[</color><color=green>SUCCESS</
color><color=grey>]</color> " + id, 5000);
GUIUtility.systemCopyBuffer = id;
}
if (GetGunInput(true))
{
VRRig gunTarget = Ray.collider.GetComponentInParent<VRRig>();
if (gunTarget && !PlayerIsLocal(gunTarget) && Time.time >
cgdgd)
{
cgdgd = Time.time + 0.5f;
PlayFabClientAPI.GetAccountInfo(new GetAccountInfoRequest {
PlayFabId = GetPlayerFromVRRig(gunTarget).UserId }, delegate (GetAccountInfoResult
result) // Who designed this
{
string date = result.AccountInfo.Created.ToString("MMMM
dd, yyyy h:mm tt");
NotifiLib.SendNotification("<color=grey>[</color><color=green>SUCCESS</
color><color=grey>]</color> " + date, 5000);
GUIUtility.systemCopyBuffer = date;
}, delegate {
NotifiLib.SendNotification("<color=grey>[</color><color=red>ERROR</
color><color=grey>]</color> Could not copy creation date."); }, null, null);
}
}
}
}
NotifiLib.SendNotification("<color=grey>[</color><color=green>SUCCESS</
color><color=grey>]</color> " + date, 5000);
GUIUtility.systemCopyBuffer = date;
}, delegate {
NotifiLib.SendNotification("<color=grey>[</color><color=red>ERROR</
color><color=grey>]</color> Could not copy creation date."); }, null, null);
}
if (GetGunInput(true))
{
VRRig gunTarget = Ray.collider.GetComponentInParent<VRRig>();
if (gunTarget && !PlayerIsLocal(gunTarget) && Time.time >
cgdgd)
{
cgdgd = Time.time + 0.5f;
PlayFabClientAPI.GetAccountInfo(new GetAccountInfoRequest {
PlayFabId = GetPlayerFromVRRig(gunTarget).UserId }, delegate (GetAccountInfoResult
result) // Who designed this
{
string date = result.AccountInfo.Created.ToString("MMMM
dd, yyyy at h mm");
CoroutineManager.RunCoroutine(SpeakText(date));
}, delegate {
NotifiLib.SendNotification("<color=grey>[</color><color=red>ERROR</
color><color=grey>]</color> Could not narrate creation date."); }, null, null);
}
}
}
}
File.WriteAllText(fileName, text);
string filePath =
Path.Combine(System.Reflection.Assembly.GetExecutingAssembly().Location, fileName);
filePath = filePath.Split("BepInEx\\")[0] + fileName;
Process.Start(filePath);
}
}
}