-- Decompiled with the Synapse X Luau decompiler.


local l__RunService__1 = game:GetService("RunService");
if game:GetService("UserInputService").TouchEnabled then
	local v2 = Instance.new("Frame");
	v2.Name = "BottomLeftControl";
	v2.Size = UDim2.new(0.1, 0, 0.1, 0);
	v2.Position = UDim2.new(1, 0, 1, 0);
	v2.AnchorPoint = Vector2.new(1, 1);
	v2.BackgroundTransparency = 1;
	v2.ZIndex = 10;
	v2.Parent = script.Parent;
	local v3 = Instance.new("ImageButton");
	v3.Name = "MouseLockLabel";
	v3.Size = UDim2.new(1, 0, 1, 0);
	v3.Position = UDim2.new(0, 0, 0, 0);
	v3.BackgroundTransparency = 1;
	v3.Image = "rbxasset://textures/ui/mouseLock_off.png";
	v3.Visible = true;
	v3.Parent = v2;
	local v4 = Instance.new("Frame");
	v4.Name = "MiddleIcon";
	v4.Size = UDim2.new(0.075, 0, 0.075, 0);
	v4.Position = UDim2.new(0.5, 0, 0.5, 0);
	v4.AnchorPoint = Vector2.new(0.5, 0.5);
	v4.BackgroundTransparency = 1;
	v4.ZIndex = 10;
	v4.Visible = true;
	v4.Parent = script.Parent;
	local v5 = Instance.new("ImageLabel");
	v5.Name = "MouseLockLabel";
	v5.Size = UDim2.new(1, 0, 1, 0);
	v5.Position = UDim2.new(0, 0, 0, 0);
	v5.BackgroundTransparency = 1;
	v5.Image = "rbxasset://textures/MouseLockedCursor.png";
	v5.Visible = false;
	v5.Parent = v4;
	local v6 = Instance.new("UIAspectRatioConstraint");
	v6.AspectRatio = 1;
	v6.DominantAxis = "Height";
	v6.Parent = v2;
	v6:Clone().Parent = v4;
	local u1 = false;
	v3.Activated:connect(function()
		u1 = not u1;
		if u1 then
			local v7 = "rbxasset://textures/ui/mouseLock_on.png";
		else
			v7 = "rbxasset://textures/ui/mouseLock_off.png";
		end;
		v3.Image = v7;
		v5.Visible = u1 or false;
	end);
	local l__LocalPlayer__2 = game.Players.LocalPlayer;
	l__RunService__1:BindToRenderStep("MobileShiftLock", Enum.RenderPriority.Camera.Value + 1, function()
		if u1 then
			local l__CurrentCamera__8 = workspace.CurrentCamera;
			if l__CurrentCamera__8 then
				local l__Character__9 = l__LocalPlayer__2.Character;
				local v10 = l__Character__9 and l__Character__9:FindFirstChild("Humanoid");
				local v11 = l__Character__9 and l__Character__9:FindFirstChild("HumanoidRootPart");
				local v12 = l__Character__9 and l__Character__9:FindFirstChild("Head");
				if v10 and v10.Health > 0 and v11 then
					local l__LookVector__13 = l__CurrentCamera__8.CFrame.LookVector;
					v11.CFrame = CFrame.new(v11.Position) * CFrame.Angles(0, math.atan2(-l__LookVector__13.X, -l__LookVector__13.Z), 0);
				end;
				if v12 and (v12.Position - l__CurrentCamera__8.CFrame.Position).Magnitude >= 1 then
					l__CurrentCamera__8.CFrame = l__CurrentCamera__8.CFrame * CFrame.new(1.75, 0, 0);
				end;
			end;
		end;
	end);
end;
