local a={}a.FocusedScreen=nil local Q=game:GetService("\084\119\101\101\110\083\101\114\118\105\099\101")local d=game:GetService("\080\108\097\121\101\114\115")local B=game:GetService("\082\117\110\083\101\114\118\105\099\101")local c=game:GetService("\083\116\097\114\116\101\114\080\108\097\121\101\114")local i=game:GetService("\085\115\101\114\073\110\112\117\116\083\101\114\118\105\099\101")local G=script:WaitForChild("\070\117\108\108\115\099\114\101\101\110\066\117\116\116\111\110\071\117\105")local y=d.LocalPlayer local r=workspace.CurrentCamera local W=nil local z=nil local h=nil local L=nil local J=nil local H=nil local b=nil local E=false local e=0 local w="\114\098\120\097\115\115\101\116\105\100\058\047\047\057\053\057\055\053\049\057\054\054\055"local f="\114\098\120\097\115\115\101\116\105\100\058\047\047\057\053\057\055\053\049\057\050\057\057"local q=Enum.KeyCode.ButtonY local K="\114\098\120\097\115\115\101\116\105\100\058\047\047\057\053\057\054\049\048\054\054\056\052"local g=Enum.KeyCode.ButtonB local V="\114\098\120\097\115\115\101\116\105\100\058\047\047\057\053\057\054\049\048\054\050\051\055"
--[[ Use Examples

-- To be used on the client.
local fullscreenModule = require(game:GetService("ReplicatedStorage"):WaitForChild("FullscreenModule"))
local screen = workspace:WaitForChild("CountdownBoardPart")

-- Creates a button that allows the user to toggle focus on a screen
fullscreenModule.CreateButtonToFocusScreen(screen)

fullscreenModule.FocusScreen(screen)	-- Forces the client to focus on a screen
wait(5)
fullscreenModule.FocusScreen()	-- Forces the client to focus back on their character

]]

local fullscreenModule = {}
fullscreenModule.FocusedScreen = nil

local TweenService = game:GetService("TweenService")
local PlayersService = game:GetService("Players")
local RunService = game:GetService("RunService")
local StarterPlayer = game:GetService("StarterPlayer")
local UserInputService = game:GetService("UserInputService")

local buttonGuiTemplate = script:WaitForChild("FullscreenButtonGui")
local localPlayer = PlayersService.LocalPlayer
local camera = workspace.CurrentCamera
local buttonGui = nil
local button = nil
local buttonTargetScreen = nil
local buttonConnection = nil
local gamepadButtonConnection = nil
local lockCameraConnection = nil
local characterCamCF = nil
local characterCamCFIsRelative = false
local transitionCount = 0

local ZOOM_IN_ICON = "rbxassetid://9597519667"
local ZOOM_OUT_ICON = "rbxassetid://9597519299"

local FULLSCREEN_GAMEPAD_BUTTON = Enum.KeyCode.ButtonY
local FULLSCREEN_GAMEPAD_BUTTON_ICON = "rbxassetid://9596106684"
local BACKOUT_GAMEPAD_BUTTON = Enum.KeyCode.ButtonB
local BACKOUT_GAMEPAD_BUTTON_ICON = "rbxassetid://9596106237"
