-- Script Path: game:GetService("Players").Blue_B00th.PlayerScripts.FreecamScript -- Took 1.49s to decompile. -- Executor: Xeno (v1.3.65) -- https://lua.expert local abs, clamp, exp, rad = math.abs, math.clamp, math.exp, math.rad local sign, sqrt, tan = math.sign, math.sqrt, math.tan local ContextActionService = game:GetService("ContextActionService") local Players = game:GetService("Players") local RunService = game:GetService("RunService") local StarterGui = game:GetService("StarterGui") local UserInputService = game:GetService("UserInputService") local Workspace = game:GetService("Workspace") local GameSettings = UserSettings().GameSettings local Lighting = game:GetService("Lighting") local LocalPlayer = Players.LocalPlayer if not LocalPlayer then Players:GetPropertyChangedSignal("LocalPlayer"):Wait() LocalPlayer = Players.LocalPlayer end local CurrentCamera = Workspace.CurrentCamera Workspace:GetPropertyChangedSignal("CurrentCamera"):Connect(function() -- line: 33 -- upvalues: Workspace (copy), CurrentCamera (ref) local CurrentCamera2 = Workspace.CurrentCamera if CurrentCamera2 then CurrentCamera = CurrentCamera2 end end) local DepthOfFieldEffect local function ok() -- line: 44 return UserSettings():IsUserFeatureEnabled("UserExitFreecamBreaksWithShiftlock") end local ok2 ok2, ok = pcall(ok) local v1 = ok2 and ok local function ok3() -- line: 52 return UserSettings():IsUserFeatureEnabled("UserShowGuiHideToggles") end ok, ok3 = pcall(ok3) local v2 = ok and ok3 local function ok4() -- line: 60 return UserSettings():IsUserFeatureEnabled("UserFixFreecamDeltaTimeCalculation") end ok3, ok4 = pcall(ok4) local v3 = ok3 and ok4 local function ok5() -- line: 68 return UserSettings():IsUserFeatureEnabled("UserFixFreecamGuiChangeVisibility") end ok4, ok5 = pcall(ok5) local v4 = ok4 and ok5 local function ok6() -- line: 76 return UserSettings():IsUserFeatureEnabled("UserFreecamControlSpeed") end ok5, ok6 = pcall(ok6) local v5 = ok5 and ok6 local function ok7() -- line: 84 return UserSettings():IsUserFeatureEnabled("UserFreecamTiltControl") end ok6, ok7 = pcall(ok7) local v6 = ok6 and ok7 local function ok8() -- line: 92 return UserSettings():IsUserFeatureEnabled("UserFreecamSmoothnessControl") end ok7, ok8 = pcall(ok8) local v7 = ok7 and ok8 local function Value() -- line: 100 return UserSettings():IsUserFeatureEnabled("UserFreecamGuiDestabilization") end ok8, Value = pcall(Value) local v8 = ok8 and Value local function result() -- line: 108 return UserSettings():IsUserFeatureEnabled("UserFreecamDepthOfFieldEffect") end Value, result = pcall(result) local v9 = Value and result Value = Enum.ContextActionPriority.Low.Value local Value2 = Enum.ContextActionPriority.High.Value local t1 = { Enum.KeyCode.LeftShift, Enum.KeyCode.P } local t2 = { [Enum.KeyCode.Z] = true, [Enum.KeyCode.C] = true } local t3 = { [Enum.KeyCode.ButtonL1] = true, [Enum.KeyCode.ButtonR1] = true } local t4 = { [Enum.KeyCode.BackSlash] = true } local v10 = Vector2.new(0.75, 1) * 8 local n1 = 1.5 local n2 = 1 local n3 = 4 local n4 = 1 local t5 = {} local n5 = 0 local t6 = {} local v11 = LocalPlayer:WaitForChild("PlayerGui"):WaitForChild("Freecam", 6) if v11 then v11:Destroy() end local t7 = {} t7.__index = t7 function t7.new(p1, p2) -- line: 175 -- upvalues: t7 (copy) local self = setmetatable({}, t7) self.f = p1 self.p = p2 self.v = p2 * 0 return self end function t7:Update(p4, p5) -- line: 183 -- upvalues: exp (copy) local v13 = self.f * 2 * 3.141592653589793 local p, v = self.p, self.v local v14 = p5 - p local v16 = exp(-v13 * p4) local v17 = p5 + (v * p4 - v14 * (v13 * p4 + 1)) * v16 local v18 = (v13 * p4 * (v14 * v13 - v) + v) * v16 self.p = v17 self.v = v18 return v17 end function t7:SetFreq(p7) -- line: 200 self.f = p7 end function t7:Reset(p9) -- line: 204 self.p = p9 self.v = p9 * 0 end local v19 = Vector3.new() local v20 = if v6 then Vector3.new() else Vector2.new() local n6 = 0 local v21 = t7.new(1.5, (Vector3.new())) local v22 = t7.new(1, Vector2.new()) local v23 = t7.new(4, 0) local v24 = t7.new(1, 0) local t9 = {} local function fCurve(p10) -- line: 233 -- upvalues: exp (copy) return (exp(2 * p10) - 1) / 6.38905609893065 end local function fDeadzone(p11) -- line: 237 -- upvalues: exp (copy) return (exp(2 * ((p11 - 0.15) / 0.85)) - 1) / 6.38905609893065 end local function thumbstickCurve(p12) -- line: 241 -- upvalues: abs (copy), clamp (copy), exp (copy), sign (copy) return sign(p12) * clamp((exp(2 * ((abs(p12) - 0.15) / 0.85)) - 1) / 6.38905609893065, 0, 1) end local t10 = { ButtonX = 0, ButtonY = 0, DPadDown = 0, DPadUp = 0, DPadLeft = 0, DPadRight = 0, ButtonL2 = 0, ButtonR2 = 0, ButtonL1 = 0, ButtonR1 = 0, Thumbstick1 = Vector2.new(), Thumbstick2 = Vector2.new() } local t11 = { W = 0, A = 0, S = 0, D = 0, E = 0, Q = 0, U = 0, H = 0, J = 0, K = 0, I = 0, Y = 0, Up = 0, Down = 0, Left = 0, Right = 0, LeftShift = 0, RightShift = 0, Z = 0, C = 0, Comma = 0, Period = 0, LeftBracket = 0, RightBracket = 0, Semicolon = 0, Quote = 0, V = 0, B = 0, N = 0, M = 0, BackSlash = 0, Minus = 0, Equals = 0 } local t12 = { MouseWheel = 0, Delta = Vector2.new() } local v30 = Vector2.new(1, 1) * 0.04908738521234052 local v31 = v30 / 60 local v32 = Vector2.new(1, 1) * 0.39269908169872414 local t13 = { FarIntensity = { ADJ = 0.1, MIN = 0, MAX = 1 }, NearIntensity = { ADJ = 0.1, MIN = 0, MAX = 1 }, FocusDistance = { ADJ = 20, MIN = 0, MAX = 200 }, FocusRadius = { ADJ = 5, MIN = 0, MAX = 50 } } local n7 = 1 local n8 = 1 local n9 = 1 function t9.Vel(p13) -- line: 350 -- upvalues: clamp (copy), UserInputService (copy), v5 (copy), thumbstickCurve (copy), t10 (copy), t11 (copy), n7 (ref) n7 = if v5 then clamp(n7 + p13 * (t11.Up - t11.Down + t10.DPadUp - t10.DPadDown) * 0.75, 0.01, 4) else clamp(n7 + p13 * (t11.Up - t11.Down) * 0.75, 0.01, 4) local v40 = Vector3.new(thumbstickCurve(t10.Thumbstick1.X), thumbstickCurve(t10.ButtonR2) - thumbstickCurve(t10.ButtonL2), thumbstickCurve(-t10.Thumbstick1.Y)) * Vector3.new(1, 1, 1) local v44 = Vector3.new(t11.D - t11.A + t11.K - t11.H, t11.E - t11.Q + t11.I - t11.Y, t11.S - t11.W + t11.J - t11.U) * Vector3.new(1, 1, 1) local v45 = UserInputService:IsKeyDown(Enum.KeyCode.LeftShift) or UserInputService:IsKeyDown(Enum.KeyCode.RightShift) return (v40 + v44) * (n7 * (if v45 then 0.05 else 1)) end function t9.Pan(p14) -- line: 373 -- upvalues: v3 (copy), thumbstickCurve (copy), t10 (copy), t12 (copy), v30 (copy), v31 (copy), v32 (copy) local v48 = Vector2.new(thumbstickCurve(t10.Thumbstick2.Y), thumbstickCurve(-t10.Thumbstick2.X)) * v32 local v49 = t12.Delta * v30 if v3 and p14 > 0 then v49 = t12.Delta / p14 * v31 end t12.Delta = Vector2.new() return v48 + v49 end function t9.Fov(p15) -- line: 388 -- upvalues: clamp (copy), v3 (copy), v5 (copy), t10 (copy), t11 (copy), t12 (copy), n9 (ref) if v5 then n9 = clamp(n9 + p15 * (t11.Right - t11.Left + t10.DPadRight - t10.DPadLeft) * 0.75, 0.01, 4) end local v52 = (t10.ButtonX - t10.ButtonY) * 0.25 local v53 = t12.MouseWheel * 1 if v3 and p15 > 0 then v53 = t12.MouseWheel / p15 * 0.016666666666666666 end t12.MouseWheel = 0 if v5 then return (v52 + v53) * n9 end return v52 + v53 end function t9.Roll(p16) -- line: 407 -- upvalues: clamp (copy), t10 (copy), t11 (copy), n8 (ref) n8 = clamp(n8 + p16 * (t11.Period - t11.Comma) * 0.75, 0.01, 4) return ((t10.ButtonR1 - t10.ButtonL1) * 1 + (t11.C - t11.Z) * 1) * n8 end function t9.SpringControl(p17) -- line: 416 -- upvalues: clamp (copy), UserInputService (copy), v9 (copy), n1 (ref), n2 (ref), n3 (ref), n4 (ref), v21 (copy), v22 (copy), v23 (copy), v24 (copy), t11 (copy) if v9 then local v56 = UserInputService:IsKeyDown(Enum.KeyCode.LeftShift) or UserInputService:IsKeyDown(Enum.KeyCode.RightShift) local v57 = UserInputService:IsKeyDown(Enum.KeyCode.LeftControl) or UserInputService:IsKeyDown(Enum.KeyCode.RightControl) if v56 or v57 then return end end n1 = clamp(n1 + p17 * (t11.RightBracket - t11.LeftBracket) * 0.75, 0.01, 10) v21:SetFreq(n1) n2 = clamp(n2 + p17 * (t11.Quote - t11.Semicolon) * 0.75, 0.01, 10) v22:SetFreq(n2) n3 = clamp(n3 + p17 * (t11.B - t11.V) * 0.75, 0.01, 10) v23:SetFreq(n3) n4 = clamp(n4 + p17 * (t11.M - t11.N) * 0.75, 0.01, 10) v24:SetFreq(n4) end function t9.DoF(p18) -- line: 439 -- upvalues: clamp (copy), UserInputService (copy), DepthOfFieldEffect (ref), t11 (copy), t13 (copy) local v70 = UserInputService:IsKeyDown(Enum.KeyCode.LeftShift) or UserInputService:IsKeyDown(Enum.KeyCode.RightShift) local v71 = UserInputService:IsKeyDown(Enum.KeyCode.LeftControl) or UserInputService:IsKeyDown(Enum.KeyCode.RightControl) if v70 then DepthOfFieldEffect.FarIntensity = clamp(DepthOfFieldEffect.FarIntensity + p18 * (t11.RightBracket - t11.LeftBracket) * t13.FarIntensity.ADJ, t13.FarIntensity.MIN, t13.FarIntensity.MAX) DepthOfFieldEffect.InFocusRadius = clamp(DepthOfFieldEffect.InFocusRadius + p18 * (t11.Equals - t11.Minus) * t13.FocusRadius.ADJ, t13.FocusRadius.MIN, t13.FocusRadius.MAX) elseif v71 then DepthOfFieldEffect.NearIntensity = clamp(DepthOfFieldEffect.NearIntensity + p18 * (t11.RightBracket - t11.LeftBracket) * t13.NearIntensity.ADJ, t13.NearIntensity.MIN, t13.NearIntensity.MAX) else DepthOfFieldEffect.FocusDistance = clamp(DepthOfFieldEffect.FocusDistance + p18 * (t11.Equals - t11.Minus) * t13.FocusDistance.ADJ, t13.FocusDistance.MIN, t13.FocusDistance.MAX) end end local function resetKeys(p19, p20) -- line: 470 for v76, _ in pairs(p19) do if p20[v76.Name] then p20[v76.Name] = 0 end end end local function handleDoubleTapReset(p21) -- line: 478 -- upvalues: v9 (copy), t2 (copy), t3 (copy), t5 (copy), n5 (ref), v20 (ref), v24 (copy), t10 (copy), t11 (copy) local elapsed = os.clock() local v77 = t5[p21] local v78 = v77 and elapsed - v77 or -1 if v77 and v78 <= 0.25 and elapsed - n5 >= 0.1 then v20 = Vector3.new(v20.x, v20.y, 0) v24:Reset(0) if v9 then for v79, _ in pairs(t3) do if t10[v79.Name] then t10[v79.Name] = 0 end end for v80, _ in pairs(t2) do if t11[v80.Name] then t11[v80.Name] = 0 end end else t10.ButtonL1 = 0 t10.ButtonR1 = 0 t11.C = 0 t11.Z = 0 end n5 = elapsed end t5[p21] = elapsed end local function Keypress(_, p23, p24) -- line: 503 -- upvalues: Lighting (copy), CurrentCamera (ref), DepthOfFieldEffect (ref), v6 (copy), v9 (copy), t2 (copy), t4 (copy), t6 (ref), t11 (copy), handleDoubleTapReset (copy) t11[p24.KeyCode.Name] = p23 == Enum.UserInputState.Begin and 1 or 0 if v6 and t2[p24.KeyCode] and p24.UserInputState == Enum.UserInputState.Begin then handleDoubleTapReset(p24.KeyCode) end if v9 and t4[p24.KeyCode] and p24.UserInputState == Enum.UserInputState.Begin then if DepthOfFieldEffect.Enabled then for _, v81 in ipairs(t6) do if v81.Parent then v81.Enabled = true end end t6 = {} else t6 = {} for _, child in ipairs(CurrentCamera:GetChildren()) do if child:IsA("DepthOfFieldEffect") and child.Enabled then t6[#t6 + 1] = child child.Enabled = false end end for _, child in ipairs(Lighting:GetChildren()) do if child:IsA("DepthOfFieldEffect") and child.Enabled then t6[#t6 + 1] = child child.Enabled = false end end CurrentCamera.ChildAdded:Connect(function(p25) -- line: 529 -- upvalues: t6 (ref) if not (p25:IsA("DepthOfFieldEffect") and p25.Enabled) then return end t6[#t6 + 1] = p25 p25.Enabled = false end) Lighting.ChildAdded:Connect(function(p26) -- line: 535 -- upvalues: t6 (ref) if not (p26:IsA("DepthOfFieldEffect") and p26.Enabled) then return end t6[#t6 + 1] = p26 p26.Enabled = false end) end DepthOfFieldEffect.Enabled = not DepthOfFieldEffect.Enabled for v82, _ in pairs(t4) do if t11[v82.Name] then t11[v82.Name] = 0 end end end return Enum.ContextActionResult.Sink end local function GpButton(_, p28, p29) -- line: 559 -- upvalues: v6 (copy), t3 (copy), t10 (copy), handleDoubleTapReset (copy) t10[p29.KeyCode.Name] = p28 == Enum.UserInputState.Begin and 1 or 0 if v6 and t3[p29.KeyCode] and p29.UserInputState == Enum.UserInputState.Begin then handleDoubleTapReset(p29.KeyCode) end return Enum.ContextActionResult.Sink end local function MousePan(_, _, p32) -- line: 571 -- upvalues: t12 (copy) local Delta = p32.Delta t12.Delta = Vector2.new(-Delta.y, -Delta.x) return Enum.ContextActionResult.Sink end local function Thumb(_, _, p35) -- line: 577 -- upvalues: t10 (copy) t10[p35.KeyCode.Name] = p35.Position return Enum.ContextActionResult.Sink end local function Trigger(_, _, p38) -- line: 582 -- upvalues: t10 (copy) t10[p38.KeyCode.Name] = p38.Position.z return Enum.ContextActionResult.Sink end local function MouseWheel(_, _, p41) -- line: 587 -- upvalues: t12 (copy) t12[p41.UserInputType.Name] = -p41.Position.z return Enum.ContextActionResult.Sink end local function Zero(p42) -- line: 592 for v83, v84 in pairs(p42) do p42[v83] = v84 * 0 end end function t9.StartCapture() -- line: 598 -- upvalues: ContextActionService (copy), v5 (copy), v6 (copy), v7 (copy), v9 (copy), Value2 (copy), Keypress (copy), GpButton (copy), MousePan (copy), Thumb (copy), Trigger (copy), MouseWheel (copy) if v5 then ContextActionService:BindActionAtPriority("FreecamKeyboard", Keypress, false, Value2, Enum.KeyCode.W, Enum.KeyCode.U, Enum.KeyCode.A, Enum.KeyCode.H, Enum.KeyCode.S, Enum.KeyCode.J, Enum.KeyCode.D, Enum.KeyCode.K, Enum.KeyCode.E, Enum.KeyCode.I, Enum.KeyCode.Q, Enum.KeyCode.Y) ContextActionService:BindActionAtPriority("FreecamKeyboardControlSpeed", Keypress, false, Value2, Enum.KeyCode.Up, Enum.KeyCode.Down, Enum.KeyCode.Left, Enum.KeyCode.Right) ContextActionService:BindActionAtPriority("FreecamGamepadControlSpeed", GpButton, false, Value2, Enum.KeyCode.DPadUp, Enum.KeyCode.DPadDown, Enum.KeyCode.DPadLeft, Enum.KeyCode.DPadRight) else ContextActionService:BindActionAtPriority("FreecamKeyboard", Keypress, false, Value2, Enum.KeyCode.W, Enum.KeyCode.U, Enum.KeyCode.A, Enum.KeyCode.H, Enum.KeyCode.S, Enum.KeyCode.J, Enum.KeyCode.D, Enum.KeyCode.K, Enum.KeyCode.E, Enum.KeyCode.I, Enum.KeyCode.Q, Enum.KeyCode.Y, Enum.KeyCode.Up, Enum.KeyCode.Down) end if v6 then ContextActionService:BindActionAtPriority("FreecamKeyboardTiltControl", Keypress, false, Value2, Enum.KeyCode.Z, Enum.KeyCode.C) ContextActionService:BindActionAtPriority("FreecamGamepadTiltControl", GpButton, false, Value2, Enum.KeyCode.ButtonL1, Enum.KeyCode.ButtonR1) ContextActionService:BindActionAtPriority("FreecamKeyboardTiltControlSpeed", Keypress, false, Value2, Enum.KeyCode.Comma, Enum.KeyCode.Period) if v7 then ContextActionService:BindActionAtPriority("FreecamKeyboardSmoothnessControl", Keypress, false, Value2, Enum.KeyCode.LeftBracket, Enum.KeyCode.RightBracket, Enum.KeyCode.Semicolon, Enum.KeyCode.Quote, Enum.KeyCode.V, Enum.KeyCode.B, Enum.KeyCode.N, Enum.KeyCode.M) end end if v9 then ContextActionService:BindActionAtPriority("FreecamKeyboardDoFToggle", Keypress, false, Value2, Enum.KeyCode.BackSlash) ContextActionService:BindActionAtPriority("FreecamKeyboardDoFControls", Keypress, false, Value2, Enum.KeyCode.Minus, Enum.KeyCode.Equals) end ContextActionService:BindActionAtPriority("FreecamMousePan", MousePan, false, Value2, Enum.UserInputType.MouseMovement) ContextActionService:BindActionAtPriority("FreecamMouseWheel", MouseWheel, false, Value2, Enum.UserInputType.MouseWheel) ContextActionService:BindActionAtPriority("FreecamGamepadButton", GpButton, false, Value2, Enum.KeyCode.ButtonX, Enum.KeyCode.ButtonY) ContextActionService:BindActionAtPriority("FreecamGamepadTrigger", Trigger, false, Value2, Enum.KeyCode.ButtonR2, Enum.KeyCode.ButtonL2) ContextActionService:BindActionAtPriority("FreecamGamepadThumbstick", Thumb, false, Value2, Enum.KeyCode.Thumbstick1, Enum.KeyCode.Thumbstick2) end function t9.StopCapture() -- line: 659 -- upvalues: ContextActionService (copy), v5 (copy), v6 (copy), v7 (copy), v9 (copy), t10 (copy), t11 (copy), t12 (copy), n7 (ref), n8 (ref), n9 (ref) n7 = 1 if v5 then n9 = 1 end if v6 then n8 = 1 end for v85, v86 in pairs(t10) do t10[v85] = v86 * 0 end for v87, v88 in pairs(t11) do t11[v87] = v88 * 0 end for v89, v90 in pairs(t12) do t12[v89] = v90 * 0 end ContextActionService:UnbindAction("FreecamKeyboard") if v5 then ContextActionService:UnbindAction("FreecamKeyboardControlSpeed") ContextActionService:UnbindAction("FreecamGamepadControlSpeed") end if v6 then ContextActionService:UnbindAction("FreecamKeyboardTiltControl") ContextActionService:UnbindAction("FreecamGamepadTiltControl") ContextActionService:UnbindAction("FreecamKeyboardTiltControlSpeed") if v7 then ContextActionService:UnbindAction("FreecamKeyboardSmoothnessControl") end end if v9 then ContextActionService:UnbindAction("FreecamKeyboardDoFToggle") ContextActionService:UnbindAction("FreecamKeyboardDoFControls") end ContextActionService:UnbindAction("FreecamMousePan") ContextActionService:UnbindAction("FreecamMouseWheel") ContextActionService:UnbindAction("FreecamGamepadButton") ContextActionService:UnbindAction("FreecamGamepadTrigger") ContextActionService:UnbindAction("FreecamGamepadThumbstick") end OverlapParams.new().BruteForceAllSlow = true local function StepFreecam(p43) -- line: 702 -- upvalues: clamp (copy), rad (copy), sqrt (copy), tan (copy), CurrentCamera (ref), DepthOfFieldEffect (ref), v6 (copy), v7 (copy), v9 (copy), v10 (copy), v19 (ref), v20 (ref), n6 (ref), v21 (copy), v22 (copy), v23 (copy), v24 (copy), t9 (copy) if v7 then t9.SpringControl(p43) end if v9 and DepthOfFieldEffect and DepthOfFieldEffect.Parent then t9.DoF(p43) end local v91 = v21:Update(p43, t9.Vel(p43)) local v92 = v22:Update(p43, t9.Pan(p43)) local v93 = v23:Update(p43, t9.Fov(p43)) local v94 = if v6 then v24:Update(p43, t9.Roll(p43)) else nil local v98 = sqrt(0.7002075382097097 / tan((rad(n6 / 2)))) n6 = clamp(n6 + v93 * 300 * (p43 / v98), 1, 120) local v101 if v6 then local v102 = v92 * v10 * (p43 / v98) v20 += Vector3.new(v102.X, v102.Y, v94 * -1.5707963267948966 * (p43 / v98)) v20 = if v7 then Vector3.new(v20.x % 6.283185307179586, v20.y % 6.283185307179586, v20.z % 6.283185307179586) else Vector3.new(clamp(v20.x, -1.5707963267948966, 1.5707963267948966), v20.y % 6.283185307179586, v20.z) v101 = CFrame.new(v19) * CFrame.fromOrientation(v20.x, v20.y, v20.z) * CFrame.new(v91 * Vector3.new(64, 64, 64) * p43) else v20 += v92 * v10 * (p43 / v98) v20 = Vector2.new(clamp(v20.x, -1.5707963267948966, 1.5707963267948966), v20.y % 6.283185307179586) v101 = CFrame.new(v19) * CFrame.fromOrientation(v20.x, v20.y, 0) * CFrame.new(v91 * Vector3.new(64, 64, 64) * p43) end v19 = v101.p CurrentCamera.CFrame = v101 CurrentCamera.Focus = v101 CurrentCamera.FieldOfView = n6 end local function CheckMouseLockAvailability() -- line: 758 -- upvalues: Players (copy), GameSettings (copy) local DevEnableMouseLock = Players.LocalPlayer.DevEnableMouseLock local v111 = Players.LocalPlayer.DevComputerMovementMode == Enum.DevComputerMovementMode.Scriptable local v112 = GameSettings.ControlMode == Enum.ControlMode.MouseLockSwitch local v113 = GameSettings.ComputerMovementMode == Enum.ComputerMovementMode.ClickToMove return DevEnableMouseLock and v112 and not v113 and not v111 end local v114, MouseIconEnabled, CameraType, Focus, _CFrame, FieldOfView local t19 = {} local t20 = { Backpack = true, Chat = true, Health = true, PlayerList = true } local t21 = { BadgesNotificationsActive = true, PointsNotificationsActive = true } local t18 = { Push = function() -- Push | line: 790 -- upvalues: Players (copy), StarterGui (copy), UserInputService (copy), GameSettings (copy), LocalPlayer (ref), CurrentCamera (ref), v1 (copy), v4 (copy), v114 (ref), MouseIconEnabled (ref), CameraType (ref), Focus (ref), _CFrame (ref), FieldOfView (ref), t19 (ref), t20 (copy), t21 (copy) for v115 in pairs(t20) do t20[v115] = StarterGui:GetCoreGuiEnabled(Enum.CoreGuiType[v115]) StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType[v115], false) end for v116 in pairs(t21) do t21[v116] = StarterGui:GetCore(v116) StarterGui:SetCore(v116, false) end local PlayerGui = LocalPlayer:FindFirstChildOfClass("PlayerGui") if PlayerGui then for _, child in pairs(PlayerGui:GetChildren()) do if child:IsA("ScreenGui") and child.Enabled then local t22 = t19 t22[#t19 + 1] = child child.Enabled = false end end if v4 then PlayerGui.ChildAdded:Connect(function(p44) -- line: 808 -- upvalues: t19 (ref) if not (p44:IsA("ScreenGui") and p44.Enabled) then return end t19[#t19 + 1] = p44 p44.Enabled = false end) end end FieldOfView = CurrentCamera.FieldOfView CurrentCamera.FieldOfView = 70 CameraType = CurrentCamera.CameraType local CurrentCamera2 = CurrentCamera CurrentCamera2.CameraType = Enum.CameraType.Custom _CFrame = CurrentCamera.CFrame Focus = CurrentCamera.Focus MouseIconEnabled = UserInputService.MouseIconEnabled UserInputService.MouseIconEnabled = false local v117 = false local v118 = false local v119 = false local v120 = false if v1 then v117 = true end local DevEnableMouseLock if v117 then DevEnableMouseLock = Players.LocalPlayer.DevEnableMouseLock if Players.LocalPlayer.DevComputerMovementMode == Enum.DevComputerMovementMode.Scriptable then v119 = true else v118 = true end end v117 = false local v121 if v118 then v121 = false v117 = true end v118 = false if v119 then v121 = true v117 = true end v119 = false if v117 then if GameSettings.ControlMode == Enum.ControlMode.MouseLockSwitch then v118 = true else v119 = true end end v117 = false local v122 if v119 then v122 = false v117 = true end v119 = false if v118 then v122 = true v117 = true end v118 = false if v117 then if GameSettings.ComputerMovementMode == Enum.ComputerMovementMode.ClickToMove then v119 = true else v118 = true end end v117 = false local v123 if v118 then v123 = false v117 = true end v118 = false if v119 then v123 = true v117 = true end v119 = false local v124 if v117 then if DevEnableMouseLock then v119 = true else v124 = DevEnableMouseLock v118 = true end end v117 = false if v119 then if v122 then v117 = true else v124 = v122 v118 = true end end v119 = false if v117 then local v125 = not v123 if v125 then v119 = true else v124 = v125 v118 = true end end if v119 then v124 = not v121 v118 = true end if v118 then v120 = not not v124 end v114 = if v120 then Enum.MouseBehavior.Default else UserInputService.MouseBehavior UserInputService.MouseBehavior = Enum.MouseBehavior.Default end, Pop = function() -- Pop | line: 838 -- upvalues: StarterGui (copy), UserInputService (copy), CurrentCamera (ref), v4 (copy), v114 (ref), MouseIconEnabled (ref), CameraType (ref), Focus (ref), _CFrame (ref), FieldOfView (ref), t19 (ref), t20 (copy), t21 (copy) for v126, v127 in pairs(t20) do StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType[v126], v127) end for v128, v129 in pairs(t21) do StarterGui:SetCore(v128, v129) end for _, v130 in pairs(t19) do if v130.Parent then v130.Enabled = true end end if v4 then t19 = {} end CurrentCamera.FieldOfView = FieldOfView FieldOfView = nil CurrentCamera.CameraType = CameraType CameraType = nil CurrentCamera.CFrame = _CFrame _CFrame = nil CurrentCamera.Focus = Focus Focus = nil UserInputService.MouseIconEnabled = MouseIconEnabled MouseIconEnabled = nil UserInputService.MouseBehavior = v114 v114 = nil end } local function StartFreecam() -- line: 874 -- upvalues: RunService (copy), LocalPlayer (ref), CurrentCamera (ref), DepthOfFieldEffect (ref), v2 (copy), v6 (copy), v7 (copy), v8 (copy), v9 (copy), n1 (ref), n2 (ref), n3 (ref), n4 (ref), v19 (ref), v20 (ref), n6 (ref), v21 (copy), v22 (copy), v23 (copy), v24 (copy), t9 (copy), StepFreecam (copy), t18 (copy) if not v8 and v2 then script:SetAttribute("FreecamEnabled", true) end local CFrame = CurrentCamera.CFrame v20 = if v6 then Vector3.new(CFrame:toEulerAnglesYXZ()) else Vector2.new(CFrame:toEulerAnglesYXZ()) v19 = CFrame.p n6 = CurrentCamera.FieldOfView v21:Reset((Vector3.new())) v22:Reset(Vector2.new()) v23:Reset(0) if v6 then v24:Reset(0) end if v7 then n1 = 1.5 n2 = 1 n3 = 4 n4 = 1 end t18.Push() if not (not v9 or DepthOfFieldEffect and DepthOfFieldEffect.Parent) then DepthOfFieldEffect = Instance.new("DepthOfFieldEffect") DepthOfFieldEffect.Enabled = false DepthOfFieldEffect.Name = "FreecamDepthOfField" DepthOfFieldEffect.Parent = CurrentCamera end local FreecamEnabled = LocalPlayer:FindFirstChild("FreecamEnabled") if FreecamEnabled then FreecamEnabled.Value = true else local BoolValue = Instance.new("BoolValue") BoolValue.Name = "FreecamEnabled" BoolValue.Value = true BoolValue.Parent = LocalPlayer end RunService:BindToRenderStep("Freecam", Enum.RenderPriority.Camera.Value, StepFreecam) t9.StartCapture() end function StopFreecam() -- line: 930 -- upvalues: RunService (copy), LocalPlayer (ref), DepthOfFieldEffect (ref), v2 (copy), v8 (copy), v9 (copy), t6 (ref), t9 (copy), t18 (copy) if not v8 and v2 then script:SetAttribute("FreecamEnabled", false) end if v9 and DepthOfFieldEffect and DepthOfFieldEffect.Parent then if DepthOfFieldEffect.Enabled then for _, v131 in ipairs(t6) do if v131.Parent then v131.Enabled = true end end t6 = {} end DepthOfFieldEffect.Enabled = false end local FreecamEnabled = LocalPlayer:FindFirstChild("FreecamEnabled") if FreecamEnabled then FreecamEnabled.Value = false else local BoolValue = Instance.new("BoolValue") BoolValue.Name = "FreecamEnabled" BoolValue.Value = false BoolValue.Parent = LocalPlayer end t9.StopCapture() RunService:UnbindFromRenderStep("Freecam") t18.Pop() end local v132 = false local function ToggleFreecam() -- line: 972 -- upvalues: v8 (copy), StartFreecam (copy), v132 (ref) if v132 then StopFreecam() else StartFreecam() end v132 = not v132 if not v8 then return end local _script = script _script:SetAttribute("FreecamEnabled", v132) end local function CheckMacro(p45) -- line: 984 -- upvalues: UserInputService (copy), v8 (copy), StartFreecam (copy), v132 (ref) for i = 1, #p45 - 1 do if not UserInputService:IsKeyDown(p45[i]) then return end end if v132 then StopFreecam() else StartFreecam() end v132 = not v132 if not v8 then return end local _script = script _script:SetAttribute("FreecamEnabled", v132) end local function HandleActivationInput(_, p47, p48) -- line: 993 -- upvalues: t1 (copy), CheckMacro (copy) if p47 == Enum.UserInputState.Begin and p48.KeyCode == t1[#t1] then CheckMacro(t1) end return Enum.ContextActionResult.Pass end ContextActionService:BindActionAtPriority("FreecamToggle", HandleActivationInput, false, Value, t1[#t1]) if not (v8 or v2) then return end local FreecamEnabled = script FreecamEnabled:SetAttribute("FreecamEnabled", v132) script:GetAttributeChangedSignal("FreecamEnabled"):Connect(function() -- line: 1006 -- upvalues: StartFreecam (copy), v132 (ref) local FreecamEnabled = script:GetAttribute("FreecamEnabled") if typeof(FreecamEnabled) == "boolean" then if FreecamEnabled ~= v132 then if FreecamEnabled then StartFreecam() v132 = true else StopFreecam() v132 = false end end else script:SetAttribute("FreecamEnabled", v132) end end)