local Q=game:GetService("\080\108\097\121\101\114\115")local I=game:GetService("\085\115\101\114\073\110\112\117\116\083\101\114\118\105\099\101")local Z=(UserSettings()):GetService("\085\115\101\114\071\097\109\101\083\101\116\116\105\110\103\115")local O=require(script.Parent:WaitForChild("\067\097\109\101\114\097\073\110\112\117\116"))local R=require(script.Parent:WaitForChild("\067\097\109\101\114\097\085\073"))local r=require(script.Parent:WaitForChild("\067\097\109\101\114\097\085\116\105\108\115"))local v=tick()R.setCameraModeToastEnabled(false)local f=false local t=false local c=v local D=false local Y=false return function(Q)local I=O.getTogglePan()if Q and I~=f then t=true end if f~=I or tick()-c>3 then local Q=I and tick()-c<3 R.setCameraModeToastOpen(Q)if I then t=false end c=tick()f=I end if Q~=D then if Q then Y=O.getTogglePan()O.setTogglePan(true)elseif not t then O.setTogglePan(Y)end end if Q then if O.getTogglePan()then r.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")r.setMouseBehaviorOverride(Enum.MouseBehavior.LockCenter)r.setRotationTypeOverride(Enum.RotationType.CameraRelative)else r.restoreMouseIcon()r.restoreMouseBehavior()r.setRotationTypeOverride(Enum.RotationType.CameraRelative)end elseif O.getTogglePan()then r.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")r.setMouseBehaviorOverride(Enum.MouseBehavior.LockCenter)r.setRotationTypeOverride(Enum.RotationType.MovementRelative)elseif O.getHoldPan()then r.restoreMouseIcon()r.setMouseBehaviorOverride(Enum.MouseBehavior.LockCurrentPosition)r.setRotationTypeOverride(Enum.RotationType.MovementRelative)else r.restoreMouseIcon()r.restoreMouseBehavior()r.restoreRotationType()end D=Q end
-- Decompiled with the Synapse X Luau decompiler.

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
