local C=game:GetService("\080\108\097\121\101\114\115")local F=game:GetService("\085\115\101\114\073\110\112\117\116\083\101\114\118\105\099\101")local l=(UserSettings()):GetService("\085\115\101\114\071\097\109\101\083\101\116\116\105\110\103\115")local B=require(script.Parent:WaitForChild("\067\097\109\101\114\097\073\110\112\117\116"))local h=require(script.Parent:WaitForChild("\067\097\109\101\114\097\085\073"))local K=require(script.Parent:WaitForChild("\067\097\109\101\114\097\085\116\105\108\115"))local y=tick()h.setCameraModeToastEnabled(false)local R=false local c=false local o=y local G=false local U=false return function(C)local F=B.getTogglePan()if C and F~=R then c=true end if R~=F or tick()-o>3 then local C=F and tick()-o<3 h.setCameraModeToastOpen(C)if F then c=false end o=tick()R=F end if C~=G then if C then U=B.getTogglePan()B.setTogglePan(true)elseif not c then B.setTogglePan(U)end end if C then if B.getTogglePan()then K.setMouseIconOverride("\114\098\120\097\115\115\101\116\058\047\047\116\101\120\116\117\114\101\115\047\067\117\114\115\111\114\115\047\067\114\111\115\115\077\111\117\115\101\073\099\111\110\046\112\110\103")K.setMouseBehaviorOverride(Enum.MouseBehavior.LockCenter)K.setRotationTypeOverride(Enum.RotationType.CameraRelative)else K.restoreMouseIcon()K.restoreMouseBehavior()K.setRotationTypeOverride(Enum.RotationType.CameraRelative)end elseif B.getTogglePan()then K.setMouseIconOverride("\114\098\120\097\115\115\101\116\058\047\047\116\101\120\116\117\114\101\115\047\067\117\114\115\111\114\115\047\067\114\111\115\115\077\111\117\115\101\073\099\111\110\046\112\110\103")K.setMouseBehaviorOverride(Enum.MouseBehavior.LockCenter)K.setRotationTypeOverride(Enum.RotationType.MovementRelative)elseif B.getHoldPan()then K.restoreMouseIcon()K.setMouseBehaviorOverride(Enum.MouseBehavior.LockCurrentPosition)K.setRotationTypeOverride(Enum.RotationType.MovementRelative)else K.restoreMouseIcon()K.restoreMouseBehavior()K.restoreRotationType()end G=C end


local l__Players__1 = game:GetService("Players");
local l__UserInputService__2 = game:GetService("UserInputService");
local l__UserGameSettings__3 = UserSettings():GetService("UserGameSettings");
local v4 = require(script.Parent:WaitForChild("CameraInput"));
local v5 = require(script.Parent:WaitForChild("CameraUI"));
local v6 = require(script.Parent:WaitForChild("CameraUtils"));
local v7 = tick();
v5.setCameraModeToastEnabled(false);
local u1 = false;
local u2 = false;
local u3 = v7;
local u4 = false;
local u5 = false;
return function(p1)
	local v8 = v4.getTogglePan();
	if p1 and v8 ~= u1 then
		u2 = true;
	end;
	if u1 ~= v8 or tick() - u3 > 3 then
		local v9 = v8 and tick() - u3 < 3;
		v5.setCameraModeToastOpen(v9);
		if v8 then
			u2 = false;
		end;
		u3 = tick();
		u1 = v8;
	end;
	if p1 ~= u4 then
		if p1 then
			u5 = v4.getTogglePan();
			v4.setTogglePan(true);
		elseif not u2 then
			v4.setTogglePan(u5);
		end;
	end;
	if p1 then
		if v4.getTogglePan() then
			v6.setMouseIconOverride("rbxasset://textures/Cursors/CrossMouseIcon.png");
			v6.setMouseBehaviorOverride(Enum.MouseBehavior.LockCenter);
			v6.setRotationTypeOverride(Enum.RotationType.CameraRelative);
		else
			v6.restoreMouseIcon();
			v6.restoreMouseBehavior();
			v6.setRotationTypeOverride(Enum.RotationType.CameraRelative);
		end;
	elseif v4.getTogglePan() then
		v6.setMouseIconOverride("rbxasset://textures/Cursors/CrossMouseIcon.png");
		v6.setMouseBehaviorOverride(Enum.MouseBehavior.LockCenter);
		v6.setRotationTypeOverride(Enum.RotationType.MovementRelative);
	elseif v4.getHoldPan() then
		v6.restoreMouseIcon();
		v6.setMouseBehaviorOverride(Enum.MouseBehavior.LockCurrentPosition);
		v6.setRotationTypeOverride(Enum.RotationType.MovementRelative);
	else
		v6.restoreMouseIcon();
		v6.restoreMouseBehavior();
		v6.restoreRotationType();
	end;
	u4 = p1;
end;
