local RunService = game:GetService("RunService")
local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")

local Mouse = Players.LocalPlayer:GetMouse()

local GameFunctions = ReplicatedStorage:WaitForChild("GameFunctions")
local CamerasFolder = GameFunctions:WaitForChild("Cameras")

local CurCamValue = CamerasFolder.CurrentCamera

local w_CameraFolder = workspace.SecurityCameras

local Max = 10

RunService.RenderStepped:Connect(function()
    -- camera code
    local w_Camera = workspace.CurrentCamera
    local p_Camera
    
    CurCamValue.Changed:Connect(function()
        if CurCamValue.Value == "Office" then -- Office view
            p_Camera = w_CameraFolder.p_Camera
            
        elseif CurCamValue.Value == "Cam1A" then -- Cam1A (Show stage)
            p_Camera = w_CameraFolder.Cam1A
            
        elseif CurCamValue.Value == "Cam1B" then -- Cam1B (Dinning area)
            p_Camera = w_CameraFolder.Cam1B
            
        elseif CurCamValue.Value == "Cam1C" then -- Cam1C (Pirate's cove)
            p_Camera = w_CameraFolder.Cam1C
            
        elseif CurCamValue.Value == "Cam2A" then -- Cam2A (West hall)
            p_Camera = w_CameraFolder.Cam2A
            
        elseif CurCamValue.Value == "Cam2B" then -- Cam2B (West hall corner)
            p_Camera = w_CameraFolder.Cam2B
            
        elseif CurCamValue.Value == "Cam3" then -- Cam3 (Broom closet)
            p_Camera = w_CameraFolder.Cam3
            
        elseif CurCamValue.Value == "Cam4A" then -- Cam4A (East hall)
            p_Camera = w_CameraFolder.Cam4A
            
        elseif CurCamValue.Value == "Cam4B" then --Cam4B (East hall corner)
            p_Camera = w_CameraFolder.Cam4B
            
        elseif CurCamValue.Value == "Cam5" then -- Cam5 (Backstage/Parts & Service)
            p_Camera = w_CameraFolder.Cam5
            
        elseif CurCamValue.Value == "Cam6" then -- Cam6 (Kitchen)
            p_Camera = w_CameraFolder.Cam6
            
        elseif CurCamValue.Value == "Cam7" then -- Cam7 (Bathrooms)
            p_Camera = w_CameraFolder.Cam7
        end
    end)
    
    w_Camera.CFrame = p_Camera.CFrame * CFrame.Angles(0, math.rad((((Mouse.X - Mouse.ViewSizeX / 2) / Mouse.ViewSizeX)) * -Max), 0)
end)

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: