-- ModuleScript RuntimeController (via decompile) local tbl_1 = {} function tbl_1.init(a1) --[[ name: init line: 4 ]] local Services_upv_1 = a1.Services local Refs_1 = a1.Refs local Modules_upv_1 = a1.Modules local State_1 = a1.State local API_upv_1 = a1.API local Player_upv_1 = Refs_1.Player local PlayerGui_upv_1 = Refs_1.PlayerGui local Character_upv_1 = Refs_1.Character local Humanoid_upv_1 = Refs_1.Humanoid local Camera_upv_1 = Refs_1.Camera local GameEvents_upv_1 = Refs_1.GameEvents local ServerFolder_upv_1 = Refs_1.ServerFolder local ClientData_upv_1 = State_1.ClientData local WeaponDataNew_upv_1 = State_1.WeaponDataNew local Movement_upv_1 = State_1.Movement local Runtime_upv_1 = State_1.Runtime local WeaponAction_upv_1 = State_1.WeaponAction local Helpers_upv_1 = State_1.Helpers local function Lerp(a2, a3, a4) --[[ name: Lerp line: 30 ]] return a2 + ((a3 - a2) * a4) end local function SyncVaultMovement(a5, a6, a7, a8, a9) --[[ name: SyncVaultMovement line: 60 upvalues: Player_upv_1 (copy, index: 1) ClientData_upv_1 (copy, index: 2) ]] if a5 == Player_upv_1 or typeof(a6) ~= "CFrame" then return end if typeof(a7) == "CFrame" and a5.Character then local HumanoidRootPart_1 = a5.Character:FindFirstChild("HumanoidRootPart") if not HumanoidRootPart_1 then return end local v1 = ClientData_upv_1.PlayersMovementSyncData[a5] if v1 == nil then v1 = {LastReceivedAt = 0, Snapshots = {}} ClientData_upv_1.PlayersMovementSyncData[a5] = v1 end v1.Vault = {OriginCFrame = HumanoidRootPart_1.CFrame, StartCFrame = a6, EndCFrame = a7, EntryDuration = math.max(tonumber(a8) or 0.3, 0.05), CrossDuration = math.max(tonumber(a9) or 0.4, 0.05), StartedAt = os.clock()} v1.Snapshots = {} v1.LastReceivedAt = os.clock() end end local function BuildPredictedMovementCFrame(a10, a11) --[[ name: BuildPredictedMovementCFrame line: 91 ]] local v2 = ((typeof(a10.Velocity) == "Vector3") and (a10.Velocity)) or Vector3.new(0, 0, 0) if a11 <= 0 then return a10.CFrame end return a10.CFrame + (v2 * a11) end local function CanSampleCurrentLaser(a12) --[[ name: CanSampleCurrentLaser line: 118 upvalues: Player_upv_1 (copy, index: 1) WeaponDataNew_upv_1 (copy, index: 2) Modules_upv_1 (copy, index: 3) Character_upv_1 (copy, index: 4) ]] if Player_upv_1.ServerData:GetAttribute("Alive") == true and WeaponDataNew_upv_1.CurrentTool ~= nil and WeaponDataNew_upv_1.CurrentTool.Model ~= nil then if WeaponDataNew_upv_1.Holster == true and Modules_upv_1.Components.Weapon.HasLaser(WeaponDataNew_upv_1.CurrentTool.Model) == true then if WeaponDataNew_upv_1.CurrentState ~= "Hold" and WeaponDataNew_upv_1.CurrentState ~= "ADS" then return false end if a12 ~= "Running" and Character_upv_1:GetAttribute("Barricading") ~= true and WeaponDataNew_upv_1.Animations.Client.Climb.IsPlaying ~= true and WeaponDataNew_upv_1.Animations.Client.Vault.IsPlaying ~= true and WeaponDataNew_upv_1.Animations.Client.Barricade.IsPlaying ~= true then return true end end return false end return false end local u1 = CFrame.new(0, 0, 0) local function HasMeaningfulShoulderRotation(a13) --[[ name: HasMeaningfulShoulderRotation line: 183 ]] local v3 = (typeof(a13) == "number") and (math.abs(a13) > 1e-04) return v3 end local function UpdateHeldShoulderRotation(a14) --[[ name: UpdateHeldShoulderRotation line: 187 upvalues: Runtime_upv_1 (copy, index: 1) ]] local v4 = (typeof(a14) == "number") and (math.abs(a14) > 1e-04) if v4 then Runtime_upv_1.LastHeldShoulderRotation = a14 else Runtime_upv_1.LastHeldShoulderRotation = nil end end local function ResolveHeldShoulderC0() --[[ name: ResolveHeldShoulderC0 line: 195 upvalues: Runtime_upv_1 (copy, index: 1) u1 (copy, index: 2) ]] local LastHeldShoulderRotation_1 = Runtime_upv_1.LastHeldShoulderRotation local v5 = (typeof(LastHeldShoulderRotation_1) == "number") and (math.abs(LastHeldShoulderRotation_1) > 1e-04) if v5 ~= true then return u1 end local v6 = (math.deg(LastHeldShoulderRotation_1) + 80) / 160 local v7 = math.clamp(-0.5 - v6, -1, -0.5) local v8 = math.clamp(v6, 0, 1) v6 = math.abs(math.deg(LastHeldShoulderRotation_1)) / 80 return u1 * CFrame.new(0, v7 * v6, v8 * v6) end local function UpdateLookRotation(a15) --[[ name: UpdateLookRotation line: 245 upvalues: Character_upv_1 (copy, index: 1) Camera_upv_1 (copy, index: 2) Modules_upv_1 (copy, index: 3) Runtime_upv_1 (copy, index: 4) Helpers_upv_1 (copy, index: 5) GameEvents_upv_1 (copy, index: 6) ]] if not Character_upv_1 or not Character_upv_1.PrimaryPart then return end if Character_upv_1:FindFirstChild("HumanoidRootPart") then local CFrame_1 = Camera_upv_1.CFrame local v9 = math.round(-math.asin(CFrame_1.LookVector.Y) / Modules_upv_1.Config.HeadRotationDecimal) * Modules_upv_1.Config.HeadRotationDecimal + Runtime_upv_1.AdditionalRotation local CFrame_2 = Character_upv_1.HumanoidRootPart.CFrame local SampledLaserTarget_1 = Runtime_upv_1.SampledLaserTarget local v10 = SampledLaserTarget_1 ~= nil local v11 = Helpers_upv_1.HasFirstPersonSpectators() local v12 = Modules_upv_1.GameModes.ShouldCaptureReplayData(Helpers_upv_1.ResolveCurrentSpectateMode()) == true local _, v13 = Runtime_upv_1.PreviousCharacterCFrame:ToEulerAnglesXYZ() local v24, v14 = CFrame_2:ToEulerAnglesXYZ() local v15 = math.abs(math.deg(v14) - math.deg(v13)) local v16 = true if v11 ~= true then v16 = v12 == true end if v16 then v13 = 0.004 else v13 = 0.02 end _ = (v16 and 0.08) or 0.35 local v18 = math.deg(math.acos(math.clamp(CFrame_1.LookVector:Dot(Runtime_upv_1.PreviousSpectateCameraCFrame.LookVector), -1, 1))) local v19 = math.deg(math.acos(math.clamp(CFrame_1.UpVector:Dot(Runtime_upv_1.PreviousSpectateCameraCFrame.UpVector), -1, 1))) local v20 = v9 ~= Runtime_upv_1.PreviousRotation local v21 = true if not (Runtime_upv_1.CharacterCFrameDistance <= (CFrame_2.Position - Runtime_upv_1.PreviousCharacterCFrame.Position).Magnitude) then v21 = Runtime_upv_1.CharacterCFrameAngleDifference <= v15 end v24 = true if not (v13 <= (CFrame_1.Position - Runtime_upv_1.PreviousSpectateCameraCFrame.Position).Magnitude) then v24 = true if not (_ <= v18) then v24 = _ <= v19 end end v19 = v10 ~= Runtime_upv_1.PreviousLaserActive if v19 == false and SampledLaserTarget_1 and Runtime_upv_1.PreviousLaserTarget then v19 = Runtime_upv_1.LaserTargetSendThreshold <= (SampledLaserTarget_1 - Runtime_upv_1.PreviousLaserTarget).Magnitude end local v23 = os.clock() if v20 == true or v21 == true then v16 = Runtime_upv_1.LookRotationRate <= v23 - Runtime_upv_1.LastLookRotationSend else v16 = false if v19 == true then v16 = Runtime_upv_1.LookRotationRate <= v23 - Runtime_upv_1.LastLookRotationSend end end v13 = ((v11 == true) and (Runtime_upv_1.SpectateCameraLookRotationRate)) or (Runtime_upv_1.ReplaySpectateCameraRate) if v11 == true then if v24 == true then _ = v13 <= v23 - Runtime_upv_1.LastSpectateCameraSend else _ = false if v12 == true then _ = v13 <= v23 - Runtime_upv_1.LastSpectateCameraSend end end else _ = false if v12 == true then if v22 == true then _ = v13 <= v23 - Runtime_upv_1.LastSpectateCameraSend else _ = false if v12 == true then _ = v13 <= v23 - Runtime_upv_1.LastSpectateCameraSend end end end end if v16 ~= true and _ ~= true then return end v24 = ((v16 == true and v20) and v9) or nil v13 = ((v16 == true and v21) and CFrame_2) or nil GameEvents_upv_1.LookRotation:FireServer(v24, v13, Character_upv_1.PrimaryPart.AssemblyLinearVelocity, ((v16 == true and v19) and SampledLaserTarget_1) or nil, ((_ == true) and CFrame_1) or nil, Camera_upv_1.FieldOfView) if v16 == true then Runtime_upv_1.LastLookRotationSend = v23 Runtime_upv_1.PreviousLaserActive = v10 Runtime_upv_1.PreviousLaserTarget = SampledLaserTarget_1 if v20 then Runtime_upv_1.PreviousRotation = v9 end if v21 then Runtime_upv_1.PreviousCharacterCFrame = CFrame_2 end end if _ == true then Runtime_upv_1.LastSpectateCameraSend = v23 Runtime_upv_1.PreviousSpectateCameraCFrame = CFrame_1 end end end local function SetSightReticleSurfaceGuiEnabled(a16, a17) --[[ name: SetSightReticleSurfaceGuiEnabled line: 327 upvalues: Runtime_upv_1 (copy, index: 1) ]] if Runtime_upv_1.LastSightReticleTool ~= a16 then if Runtime_upv_1.LastSightReticleGuis then for _, value_1 in ipairs(Runtime_upv_1.LastSightReticleGuis) do if not (value_1) then continue end if value_1.Parent then value_1.Enabled = false end end end Runtime_upv_1.LastSightReticleTool = a16 Runtime_upv_1.LastSightReticleGuis = nil Runtime_upv_1.LastSightReticleEnabled = nil end if not a16 then return end local v24 = Runtime_upv_1.LastSightReticleGuis if v24 == nil then local tbl_2 = {} for _, value_2 in ipairs(a16:GetDescendants()) do if not (value_2:IsA("SurfaceGui")) or not (value_2.Parent) then continue end if value_2.Parent.Name == "Reticle" then table.insert(tbl_2, value_2) end end Runtime_upv_1.LastSightReticleGuis = tbl_2 v24 = tbl_2 end if Runtime_upv_1.LastSightReticleEnabled == a17 then return end Runtime_upv_1.LastSightReticleEnabled = a17 for _, value_3 in ipairs(v24) do if not (value_3) then continue end if value_3.Parent then value_3.Enabled = a17 end end end local function UpdateFigure8Arm(a18, a19) --[[ name: UpdateFigure8Arm line: 306 upvalues: Character_upv_1 (copy, index: 1) Runtime_upv_1 (copy, index: 2) ]] if Character_upv_1 and Character_upv_1.PrimaryPart then local Magnitude_1 = (Character_upv_1.PrimaryPart.AssemblyLinearVelocity * Vector3.new(1, 0, 1)).Magnitude if math.floor(Magnitude_1) > 0 then Runtime_upv_1.ArmLerp = Runtime_upv_1.ArmLerp + ((a18 * Magnitude_1) * 1.1) local v25 = 0.1 Runtime_upv_1.ArmZ = 1 if a19 == "Running" then local v26 = 0.4 Runtime_upv_1.ArmZ = 0 v25 = v26 end local ArmSin_1 = Runtime_upv_1.ArmSin Runtime_upv_1.ArmSin = ArmSin_1 + ((((math.sin(Runtime_upv_1.ArmLerp / 2) * Magnitude_1) * v25) - ArmSin_1) * 0.4) local ArmSin2_1 = Runtime_upv_1.ArmSin2 Runtime_upv_1.ArmSin2 = ArmSin2_1 + ((((math.sin(Runtime_upv_1.ArmLerp) * Magnitude_1) * v25) - ArmSin2_1) * 0.4) else Runtime_upv_1.ArmLerp = 0 local ArmSin_2 = Runtime_upv_1.ArmSin Runtime_upv_1.ArmSin = ArmSin_2 + ((0 - ArmSin_2) * 0.3) local ArmSin2_2 = Runtime_upv_1.ArmSin2 Runtime_upv_1.ArmSin2 = ArmSin2_2 + ((0 - ArmSin2_2) * 0.3) end return CFrame.Angles(math.rad(Runtime_upv_1.ArmSin2), math.rad(Runtime_upv_1.ArmSin), math.rad(Runtime_upv_1.ArmZ * Runtime_upv_1.ArmSin2)) end return CFrame.new() end local function MovementBobbleEffect() --[[ name: MovementBobbleEffect line: 99 upvalues: API_upv_1 (copy, index: 1) WeaponDataNew_upv_1 (copy, index: 2) Humanoid_upv_1 (copy, index: 3) Runtime_upv_1 (copy, index: 4) Movement_upv_1 (copy, index: 5) Modules_upv_1 (copy, index: 6) ClientData_upv_1 (copy, index: 7) ]] local time_1 = tick() if API_upv_1.Movement.GetMovement() == "Running" and WeaponDataNew_upv_1.CurrentTool.Aiming ~= true then if Humanoid_upv_1.MoveDirection.Magnitude > 0 then Humanoid_upv_1.CameraOffset = Humanoid_upv_1.CameraOffset:lerp(Vector3.new(math.cos(time_1 * 8) * 0.4, math.abs(math.sin(time_1 * 8)) * 0.4, 0), 0.25) Runtime_upv_1.BobbleDebounce = true end return end if API_upv_1.Movement.GetMovement() ~= "Standing" or Runtime_upv_1.BobbleDebounce ~= true then return end if Movement_upv_1.StanceCurrentTween then Movement_upv_1.StanceCurrentTween:Cancel() end Movement_upv_1.StanceCurrentTween = Modules_upv_1.Components.Menu.TweenCreate(Humanoid_upv_1, {CameraOffset = Vector3.new(API_upv_1.Movement.GetLean(), ClientData_upv_1.CameraY, 0)}, Enum.EasingStyle.Sine, 0.3, false) Runtime_upv_1.BobbleDebounce = false end local function UpdateLeaning(a20) --[[ name: UpdateLeaning line: 466 upvalues: API_upv_1 (copy, index: 1) Runtime_upv_1 (copy, index: 2) WeaponDataNew_upv_1 (copy, index: 3) Modules_upv_1 (copy, index: 4) Helpers_upv_1 (copy, index: 5) Camera_upv_1 (copy, index: 6) ]] local v27 = API_upv_1.Movement.GetLean() or 0 local v28 = 0.13 * a20 if v27 ~= 0 then Runtime_upv_1.NextLeanDirection = math.clamp(Runtime_upv_1.NextLeanDirection + (-v27 * v28), -1, 1) else local NextLeanDirection_1 = Runtime_upv_1.NextLeanDirection Runtime_upv_1.NextLeanDirection = NextLeanDirection_1 + ((-v27 - NextLeanDirection_1) * v28) end if (WeaponDataNew_upv_1.CurrentTool) and (WeaponDataNew_upv_1.CurrentTool.Model) then local NextLeanAngle_1 = Runtime_upv_1.NextLeanAngle Runtime_upv_1.NextLeanAngle = NextLeanAngle_1 + (((Modules_upv_1.Config.LeanAngle * Runtime_upv_1.NextLeanDirection) - NextLeanAngle_1) * (v28 * 2)) else local NextLeanAngle_2 = Runtime_upv_1.NextLeanAngle Runtime_upv_1.NextLeanAngle = NextLeanAngle_2 + ((0 - NextLeanAngle_2) * 1) end local v29 = CFrame.fromAxisAngle(Vector3.new(0, 0, 1), math.rad(Runtime_upv_1.NextLeanAngle)) if Helpers_upv_1.IsFirstPersonSpectateCameraActive() ~= true then Camera_upv_1.CFrame = Camera_upv_1.CFrame * v29 end if not WeaponDataNew_upv_1.CameraModel then return end WeaponDataNew_upv_1.CameraModel.Base.CFrame = (Camera_upv_1.CFrame * CFrame.new(0, 0, -0.5)) * v29 end local function UpdateBarrier() --[[ name: UpdateBarrier line: 503 upvalues: ServerFolder_upv_1 (copy, index: 1) ClientData_upv_1 (copy, index: 2) Player_upv_1 (copy, index: 3) ]] if ServerFolder_upv_1:GetAttribute("GameMode") ~= "Skirmish" then return end if ClientData_upv_1.EnemyBarrier == nil and ClientData_upv_1.TeamBarrier == nil then if Player_upv_1.Team.Name == ServerFolder_upv_1:GetAttribute("Defender") then ClientData_upv_1.EnemyBarrier = workspace.Map:FindFirstChild("AttackerBarrier", true) ClientData_upv_1.EnemyColor = ServerFolder_upv_1:GetAttribute(ServerFolder_upv_1:GetAttribute("Attacker") .. "Color") ClientData_upv_1.TeamBarrier = workspace.Map:FindFirstChild("DefenderBarrier", true) ClientData_upv_1.TeamColor = ServerFolder_upv_1:GetAttribute(ServerFolder_upv_1:GetAttribute("Defender") .. "Color") elseif Player_upv_1.Team.Name == ServerFolder_upv_1:GetAttribute("Attacker") then ClientData_upv_1.EnemyBarrier = workspace.Map:FindFirstChild("DefenderBarrier", true) ClientData_upv_1.EnemyColor = ServerFolder_upv_1:GetAttribute(ServerFolder_upv_1:GetAttribute("Defender") .. "Color") ClientData_upv_1.TeamBarrier = workspace.Map:FindFirstChild("AttackerBarrier", true) ClientData_upv_1.TeamColor = ServerFolder_upv_1:GetAttribute(ServerFolder_upv_1:GetAttribute("Attacker") .. "Color") end return end if not ClientData_upv_1.EnemyBarrier or not ClientData_upv_1.TeamBarrier or ClientData_upv_1.EnemyBarrier:GetAttribute("CanCollide") == true then return end ClientData_upv_1.EnemyBarrier:SetAttribute("CanCollide", true) for _, value_4 in pairs(ClientData_upv_1.EnemyBarrier:GetChildren()) do value_4.CanCollide = true if value_4:FindFirstChild("Mesh") then value_4.Mesh.VertexColor = Vector3.new(ClientData_upv_1.EnemyColor.R, ClientData_upv_1.EnemyColor.G, ClientData_upv_1.EnemyColor.B) end end for _, value_5 in pairs(ClientData_upv_1.TeamBarrier:GetChildren()) do value_5.CanCollide = false if value_5:FindFirstChild("Mesh") then value_5.Mesh.VertexColor = Vector3.new(ClientData_upv_1.TeamColor.R, ClientData_upv_1.TeamColor.G, ClientData_upv_1.TeamColor.B) end end end local function UpdateMovementSync(a21, a22) --[[ name: UpdateMovementSync line: 564 upvalues: Player_upv_1 (copy, index: 1) Helpers_upv_1 (copy, index: 2) Runtime_upv_1 (copy, index: 3) ClientData_upv_1 (copy, index: 4) ]] local v30 = true if Player_upv_1.ServerData:GetAttribute("Alive") ~= true then v30 = Helpers_upv_1.ShouldReceiveFirstPersonSpectateSync() == true end if v30 == false then return end v30 = os.clock() - Runtime_upv_1.RemoteMovementBufferDelay local v31 = nil local v32 = nil for key_1, value_6 in pairs(ClientData_upv_1.PlayersMovementSyncData) do if value_6 == nil or not (key_1) or not (key_1.Character) then ClientData_upv_1.PlayersMovementSyncData[key_1] = nil continue end local HumanoidRootPart_2 = key_1.Character:FindFirstChild("HumanoidRootPart") if not (HumanoidRootPart_2) or not (key_1:FindFirstChild("ServerData")) or key_1.ServerData:GetAttribute("Alive") ~= true then ClientData_upv_1.PlayersMovementSyncData[key_1] = nil continue end local Vault_1 = value_6.Vault if typeof(Vault_1) ~= "table" then local Snapshots_1 = value_6.Snapshots if typeof(Snapshots_1) ~= "table" or #Snapshots_1 <= 0 then if (value_6.LastReceivedAt or 0) + Runtime_upv_1.RemoteMovementStaleAfter < os.clock() then ClientData_upv_1.PlayersMovementSyncData[key_1] = nil end else while #Snapshots_1 >= 2 do if Snapshots_1[2].ReceivedAt <= v30 then table.remove(Snapshots_1, 1) continue else break end end if #Snapshots_1 >= 2 then local _ = Snapshots_1[1] local v39 = Snapshots_1[2] v31 = Snapshots_1[1].CFrame:Lerp(Snapshots_1[2].CFrame, math.clamp((v30 - Snapshots_1[1].ReceivedAt) / math.max(Snapshots_1[2].ReceivedAt - Snapshots_1[1].ReceivedAt, 0.008333333333333333), 0, 1)) else local v33 = Snapshots_1[1] local v34 = math.clamp(v30 - Snapshots_1[1].ReceivedAt, 0, Runtime_upv_1.RemoteMovementMaxExtrapolation) local v35 = ((typeof(v33.Velocity) == "Vector3") and (v33.Velocity)) or Vector3.new(0, 0, 0) v31 = ((not (v34 <= 0)) and (v33.CFrame + v35 * v34)) or (v33.CFrame) end if v31 ~= nil then if Runtime_upv_1.RemoteMovementWarpDistance <= (HumanoidRootPart_2.Position - v31.Position).Magnitude then HumanoidRootPart_2.CFrame = v31 else HumanoidRootPart_2.CFrame = HumanoidRootPart_2.CFrame:Lerp(v31, math.clamp(Runtime_upv_1.RemoteMovementBlendAlpha * a22, 0, 1)) end end if not ((value_6.LastReceivedAt or 0) + Runtime_upv_1.RemoteMovementStaleAfter < os.clock()) then continue end if #Snapshots_1 <= 1 then ClientData_upv_1.PlayersMovementSyncData[key_1] = nil end end else local v36 = tonumber(Vault_1.EntryDuration) or 0.3 local v37 = tonumber(Vault_1.CrossDuration) or 0.4 local v38 = os.clock() - (tonumber(Vault_1.StartedAt) or 0) if v38 <= v36 + v37 then if v38 <= v36 then v32 = Vault_1.OriginCFrame:Lerp(Vault_1.StartCFrame, math.clamp(v38 / math.max(v36, 0.008333333333333333), 0, 1)) else v32 = Vault_1.StartCFrame:Lerp(Vault_1.EndCFrame, math.clamp((v38 - v36) / math.max(v37, 0.008333333333333333), 0, 1)) end if v32 then HumanoidRootPart_2.CFrame = v32 end else HumanoidRootPart_2.CFrame = Vault_1.EndCFrame value_6.Vault = nil local Snapshots_1 = value_6.Snapshots if typeof(Snapshots_1) ~= "table" or #Snapshots_1 <= 0 then if (value_6.LastReceivedAt or 0) + Runtime_upv_1.RemoteMovementStaleAfter < os.clock() then ClientData_upv_1.PlayersMovementSyncData[key_1] = nil end else while #Snapshots_1 >= 2 do if Snapshots_1[2].ReceivedAt <= v30 then table.remove(Snapshots_1, 1) continue else break end end if #Snapshots_1 >= 2 then local _ = Snapshots_1[1] local v39 = Snapshots_1[2] v31 = Snapshots_1[1].CFrame:Lerp(Snapshots_1[2].CFrame, math.clamp((v30 - Snapshots_1[1].ReceivedAt) / math.max(Snapshots_1[2].ReceivedAt - Snapshots_1[1].ReceivedAt, 0.008333333333333333), 0, 1)) else local v33 = Snapshots_1[1] local v34 = math.clamp(v30 - Snapshots_1[1].ReceivedAt, 0, Runtime_upv_1.RemoteMovementMaxExtrapolation) local v35 = ((typeof(v33.Velocity) == "Vector3") and (v33.Velocity)) or Vector3.new(0, 0, 0) v31 = ((not (v34 <= 0)) and (v33.CFrame + v35 * v34)) or (v33.CFrame) end if v31 ~= nil then if Runtime_upv_1.RemoteMovementWarpDistance <= (HumanoidRootPart_2.Position - v31.Position).Magnitude then HumanoidRootPart_2.CFrame = v31 else HumanoidRootPart_2.CFrame = HumanoidRootPart_2.CFrame:Lerp(v31, math.clamp(Runtime_upv_1.RemoteMovementBlendAlpha * a22, 0, 1)) end end if not ((value_6.LastReceivedAt or 0) + Runtime_upv_1.RemoteMovementStaleAfter < os.clock()) then continue end if #Snapshots_1 <= 1 then ClientData_upv_1.PlayersMovementSyncData[key_1] = nil end end end end end end local function UpdateScopeSway(a23) --[[ name: UpdateScopeSway line: 662 upvalues: Character_upv_1 (copy, index: 1) WeaponDataNew_upv_1 (copy, index: 2) ClientData_upv_1 (copy, index: 3) Runtime_upv_1 (copy, index: 4) Helpers_upv_1 (copy, index: 5) ]] if not Character_upv_1 then return end if Character_upv_1.PrimaryPart then local Magnitude_2 = (Character_upv_1.PrimaryPart.AssemblyLinearVelocity * Vector3.new(1, 0, 1)).Magnitude if WeaponDataNew_upv_1.CurrentTool.Aiming == false and ClientData_upv_1.GameHUD.ScopeUI.Visible == true then if math.floor(Magnitude_2) > 0 then ClientData_upv_1.ScopeAiming = ClientData_upv_1.ScopeAiming + ((a23 * Magnitude_2) * 1.05) local ScopeSwaySin_1 = Runtime_upv_1.ScopeSwaySin Runtime_upv_1.ScopeSwaySin = ScopeSwaySin_1 + ((((math.sin(ClientData_upv_1.ScopeAiming / 2) * Magnitude_2) * 2) - ScopeSwaySin_1) * 0.4) local ScopeSwayCos_1 = Runtime_upv_1.ScopeSwayCos Runtime_upv_1.ScopeSwayCos = ScopeSwayCos_1 + ((((math.sin(ClientData_upv_1.ScopeAiming) * Magnitude_2) * 2) - ScopeSwayCos_1) * 0.4) else ClientData_upv_1.ScopeAiming = 0 local ScopeSwaySin_2 = Runtime_upv_1.ScopeSwaySin Runtime_upv_1.ScopeSwaySin = ScopeSwaySin_2 + ((0 - ScopeSwaySin_2) * 0.3) local ScopeSwayCos_2 = Runtime_upv_1.ScopeSwayCos Runtime_upv_1.ScopeSwayCos = ScopeSwayCos_2 + ((0 - ScopeSwayCos_2) * 0.3) end ClientData_upv_1.GameHUD.ScopeUI.Scope.Position = UDim2.new(0.5, Runtime_upv_1.ScopeSwaySin, 0.5, Runtime_upv_1.ScopeSwayCos + Helpers_upv_1.getGuiInset()) return end if ClientData_upv_1.ScopeAiming == nil then ClientData_upv_1.ScopeAiming = 0 end end end local function SyncMovement(a24, a25, a26) --[[ name: SyncMovement line: 34 upvalues: Player_upv_1 (copy, index: 1) ClientData_upv_1 (copy, index: 2) ]] if a25 == nil or a24 == Player_upv_1 or not a24.Character or a24.Character:FindFirstChild("HumanoidRootPart") == nil then return end if a24.Character:FindFirstChild("Torso") ~= nil then local v39 = ClientData_upv_1.PlayersMovementSyncData[a24] if v39 == nil then v39 = {LastReceivedAt = 0, Snapshots = {}} ClientData_upv_1.PlayersMovementSyncData[a24] = v39 end local v40 = os.clock() local Snapshots_2 = v39.Snapshots local tbl_3 = {ReceivedAt = 0, Velocity = 0} tbl_3.CFrame = a25 tbl_3.Velocity = typeof(a26) == "Vector3" and a26 or Vector3.new(0, 0, 0) tbl_3.ReceivedAt = v40 table.insert(Snapshots_2, tbl_3) v39.LastReceivedAt = v40 while #Snapshots_2 > 4 do table.remove(Snapshots_2, 1) end end end GameEvents_upv_1.LookRotation.OnClientEvent:Connect( function(a27, a28, a29, a30) --[[ line: 684 upvalues: SyncMovement (copy, index: 1) ]] SyncMovement(a27, a28, a30) end ) GameEvents_upv_1:WaitForChild("VaultSync").OnClientEvent:Connect( function(a31, a32, a33, a34, a35) --[[ line: 688 upvalues: SyncVaultMovement (copy, index: 1) ]] SyncVaultMovement(a31, a32, a33, a34, a35) end ) GameEvents_upv_1.CameraShake.OnClientEvent:Connect( function(a36, a37) --[[ line: 692 upvalues: Runtime_upv_1 (copy, index: 1) Modules_upv_1 (copy, index: 2) ]] Runtime_upv_1.CameraShake:Shake(Modules_upv_1.CShakeModule.Presets[a36]) end ) local function ApplyLocalLookRotationPreview(a38) --[[ name: ApplyLocalLookRotationPreview line: 208 upvalues: Character_upv_1 (copy, index: 1) Camera_upv_1 (copy, index: 2) Modules_upv_1 (copy, index: 3) Runtime_upv_1 (copy, index: 4) API_upv_1 (copy, index: 5) ResolveHeldShoulderC0 (copy, index: 6) ]] if not Character_upv_1 then return end local Torso_1 = Character_upv_1:FindFirstChild("Torso") local Head_1 = Character_upv_1:FindFirstChild("Head") local _ = Torso_1 and (Torso_1:FindFirstChild("Neck")) local AnimBase_1 = Character_upv_1:FindFirstChild("AnimBase") local v44 = AnimBase_1 and (AnimBase_1:FindFirstChild("Shoulder")) if not Torso_1 then return end if Head_1 and Torso_1 and Torso_1:IsA("Motor6D") then AnimBase_1 = a38 AnimBase_1 = ((typeof(AnimBase_1) == "number") and (math.round(AnimBase_1 / Modules_upv_1.Config.HeadRotationDecimal) * Modules_upv_1.Config.HeadRotationDecimal)) or (math.round(-math.asin(Camera_upv_1.CFrame.LookVector.Y) / Modules_upv_1.Config.HeadRotationDecimal) * Modules_upv_1.Config.HeadRotationDecimal + Runtime_upv_1.AdditionalRotation) local v42 = false if typeof(AnimBase_1) == "number" then v42 = math.abs(AnimBase_1) > 1e-04 end if v42 then Runtime_upv_1.LastHeldShoulderRotation = AnimBase_1 else Runtime_upv_1.LastHeldShoulderRotation = nil end Torso_1.C0 = CFrame.new(Torso_1.CFrame:ToObjectSpace(CFrame.new(Torso_1.Position + (Torso_1.CFrame.LookVector * math.clamp(AnimBase_1 / 2.6, -0.5, 0.5))) + (Torso_1.CFrame.UpVector * 1.5)).Position) Torso_1.C1 = CFrame.Angles(AnimBase_1, 0, 0) if not AnimBase_1 then return end if AnimBase_1:IsA("Motor6D") then local v43 = API_upv_1.Movement.GetMovement() AnimBase_1 = Character_upv_1:GetAttribute("Barricading") == true if v43 == "Running" or AnimBase_1 == true then AnimBase_1.C0 = CFrame.new() else AnimBase_1.C0 = ResolveHeldShoulderC0() end AnimBase_1.C1 = CFrame.new() end end end local function UpdateAttackerMovement() --[[ name: UpdateAttackerMovement line: 491 upvalues: Player_upv_1 (copy, index: 1) ServerFolder_upv_1 (copy, index: 2) Humanoid_upv_1 (copy, index: 3) Character_upv_1 (copy, index: 4) API_upv_1 (copy, index: 5) ]] if Player_upv_1.Team.Name ~= ServerFolder_upv_1:GetAttribute("Attacker") then return end if ServerFolder_upv_1:GetAttribute("AttackerMovement") == false then Humanoid_upv_1.WalkSpeed = 0 elseif Character_upv_1:GetAttribute("MovedOnce") ~= true then Humanoid_upv_1.WalkSpeed = API_upv_1.Movement.GetWalkSpeed() Character_upv_1:SetAttribute("MovedOnce", true) end end local function UpdateClimbAnimation() --[[ name: UpdateClimbAnimation line: 654 upvalues: WeaponDataNew_upv_1 (copy, index: 1) Character_upv_1 (copy, index: 2) Modules_upv_1 (copy, index: 3) ]] if WeaponDataNew_upv_1.Animations.Client.Climb.IsPlaying ~= true or not Character_upv_1 or not Character_upv_1.PrimaryPart then return end local Magnitude_3 = (Character_upv_1.PrimaryPart.AssemblyLinearVelocity * Vector3.new(0, 1, 0)).Magnitude WeaponDataNew_upv_1.Animations.Client.Climb:AdjustSpeed(Magnitude_3 / Modules_upv_1.Config.CrouchWalkSpeed) WeaponDataNew_upv_1.Animations.Server.Climb:AdjustSpeed(Magnitude_3 / Modules_upv_1.Config.CrouchWalkSpeed) end local function UpdateViewmodel(a39, a40, a41) --[[ name: UpdateViewmodel line: 368 upvalues: WeaponDataNew_upv_1 (copy, index: 1) Runtime_upv_1 (copy, index: 2) Humanoid_upv_1 (copy, index: 3) SetSightReticleSurfaceGuiEnabled (copy, index: 4) Camera_upv_1 (copy, index: 5) MovementBobbleEffect (copy, index: 6) UpdateFigure8Arm (copy, index: 7) ClientData_upv_1 (copy, index: 8) ]] if WeaponDataNew_upv_1.CurrentTool ~= nil then if not (Humanoid_upv_1.Health <= 0) and WeaponDataNew_upv_1.CameraModel then local Settings_1 = WeaponDataNew_upv_1.CurrentTool.Settings and (WeaponDataNew_upv_1.CurrentTool.Settings.SightFront) if Runtime_upv_1.LastSightFront and Runtime_upv_1.LastSightFront ~= Settings_1 then Runtime_upv_1.LastSightFront.Transparency = 0 end Runtime_upv_1.LastSightFront = Settings_1 local v44 = nil if WeaponDataNew_upv_1.CurrentTool.Model ~= nil then MovementBobbleEffect() local AdditionalRotation_1 = Runtime_upv_1.AdditionalRotation Runtime_upv_1.AdditionalRotation = AdditionalRotation_1 + ((0 - AdditionalRotation_1) * (0.15 * a40)) local v45 = UpdateFigure8Arm(a39, a41) v44 = WeaponDataNew_upv_1.CurrentTool.Tool:GetAttribute("Class") if v44 ~= "Primary" and v44 ~= "Secondary" then Runtime_upv_1.ADSTransitionActive = false Runtime_upv_1.LastADSTransitionTool = WeaponDataNew_upv_1.CurrentTool Runtime_upv_1.LastADSTransitionAiming = false SetSightReticleSurfaceGuiEnabled(WeaponDataNew_upv_1.CurrentTool.Model, false) if WeaponDataNew_upv_1.CameraModel.Parent then WeaponDataNew_upv_1.CameraModel.Anim.Base.C1 = WeaponDataNew_upv_1.CameraModel.Anim.Base.C1:Lerp(WeaponDataNew_upv_1.CameraModel.Anim.Base.C0:Inverse() * v45, 0.4 * a40) WeaponDataNew_upv_1.CameraModel.Anim.Base.C0 = CFrame.new(0, 0, 0) if Settings_1 then Settings_1.Transparency = 0 end end return end if WeaponDataNew_upv_1.CurrentTool.Aiming ~= false then ClientData_upv_1.Recoil = ClientData_upv_1.Recoil:Lerp(CFrame.new(), WeaponDataNew_upv_1.CurrentTool.Settings.PunchRecover) else ClientData_upv_1.Recoil = ClientData_upv_1.Recoil:Lerp(CFrame.new(), WeaponDataNew_upv_1.CurrentTool.Settings.PunchRecover * 0.7) end if not WeaponDataNew_upv_1.CameraModel.Parent or not WeaponDataNew_upv_1.AimPart then return end local v46 = WeaponDataNew_upv_1.CameraModel.Anim.CFrame:ToObjectSpace(WeaponDataNew_upv_1.AimPart.CFrame) local v47 = WeaponDataNew_upv_1.CurrentTool.Aiming == true local v48 if v47 then v48 = CFrame.new(0, 0, WeaponDataNew_upv_1.AimPart:GetAttribute("AimZ") or 0.2) else v48 = CFrame.new(0, 0, 0) end local v49 = (v47 and (ClientData_upv_1.Recoil * v46)) or (v48:Inverse() * ClientData_upv_1.Recoil * v45) if Runtime_upv_1.LastADSTransitionTool ~= WeaponDataNew_upv_1.CurrentTool then Runtime_upv_1.LastADSTransitionTool = WeaponDataNew_upv_1.CurrentTool Runtime_upv_1.LastADSTransitionAiming = v47 Runtime_upv_1.ADSTransitionActive = false end if Runtime_upv_1.LastADSTransitionAiming ~= v47 then Runtime_upv_1.LastADSTransitionAiming = v47 Runtime_upv_1.ADSTransitionActive = true Runtime_upv_1.ADSTransitionStartedAt = os.clock() Runtime_upv_1.ADSTransitionFromC0 = WeaponDataNew_upv_1.CameraModel.Anim.Base.C0 Runtime_upv_1.ADSTransitionFromC1 = WeaponDataNew_upv_1.CameraModel.Anim.Base.C1 end if Runtime_upv_1.ADSTransitionActive ~= true then WeaponDataNew_upv_1.CameraModel.Anim.Base.C1 = WeaponDataNew_upv_1.CameraModel.Anim.Base.C1:Lerp(v49, 0.4 * a40) WeaponDataNew_upv_1.CameraModel.Anim.Base.C0 = v48 SetSightReticleSurfaceGuiEnabled(WeaponDataNew_upv_1.CurrentTool.Model, v47) if not Settings_1 then return end Settings_1.Transparency = (v47 and 1) or 0 else local v50 = math.clamp((os.clock() - (Runtime_upv_1.ADSTransitionStartedAt or 0)) / 0.12, 0, 1) local v51 = Runtime_upv_1.ADSTransitionFromC0 or (WeaponDataNew_upv_1.CameraModel.Anim.Base.C0) local v52 = Runtime_upv_1.ADSTransitionFromC1 or (WeaponDataNew_upv_1.CameraModel.Anim.Base.C1) local v53 = v47 and (v50 >= 0.5) WeaponDataNew_upv_1.CameraModel.Anim.Base.C0 = v51:Lerp(v48, v50) WeaponDataNew_upv_1.CameraModel.Anim.Base.C1 = v52:Lerp(v49, v50) SetSightReticleSurfaceGuiEnabled(WeaponDataNew_upv_1.CurrentTool.Model, v53) if Settings_1 then local v54 = math.clamp((v50 - 0.5) / 0.5, 0, 1) Settings_1.Transparency = (v47 and v54) or 0 end if not (v50 >= 1) then return end Runtime_upv_1.ADSTransitionActive = false end else if Runtime_upv_1.LastSightReticleTool ~= nil then if Runtime_upv_1.LastSightReticleGuis then for _, value_7 in ipairs(Runtime_upv_1.LastSightReticleGuis) do if not (value_7) then continue end if value_7.Parent then value_7.Enabled = false end end end Runtime_upv_1.LastSightReticleTool = nil Runtime_upv_1.LastSightReticleGuis = nil Runtime_upv_1.LastSightReticleEnabled = nil end WeaponDataNew_upv_1.CameraModel.Base.CFrame = Camera_upv_1.CFrame * CFrame.new(0, 0, -0.5) end else SetSightReticleSurfaceGuiEnabled(WeaponDataNew_upv_1.CurrentTool.Model, false) end elseif Runtime_upv_1.LastSightReticleTool ~= nil then if Runtime_upv_1.LastSightReticleGuis then for _, value_8 in ipairs(Runtime_upv_1.LastSightReticleGuis) do if not (value_8) then continue end if value_8.Parent then value_8.Enabled = false end end end Runtime_upv_1.LastSightReticleTool = nil Runtime_upv_1.LastSightReticleGuis = nil Runtime_upv_1.LastSightReticleEnabled = nil end end local function SampleLocalLaserTarget(a42) --[[ name: SampleLocalLaserTarget line: 146 upvalues: WeaponDataNew_upv_1 (copy, index: 1) Runtime_upv_1 (copy, index: 2) Modules_upv_1 (copy, index: 3) CanSampleCurrentLaser (copy, index: 4) PlayerGui_upv_1 (copy, index: 5) Camera_upv_1 (copy, index: 6) Character_upv_1 (copy, index: 7) ]] local v55 = ((WeaponDataNew_upv_1.CurrentTool) and (WeaponDataNew_upv_1.CurrentTool.Model)) or nil if Runtime_upv_1.ActiveLocalLaserWeaponModel and Runtime_upv_1.ActiveLocalLaserWeaponModel ~= v55 then Modules_upv_1.Components.Weapon.SetExtraTarget(Runtime_upv_1.ActiveLocalLaserWeaponModel, nil) Runtime_upv_1.ActiveLocalLaserWeaponModel = nil end if CanSampleCurrentLaser(a42) == true then local v56 = nil if v55 ~= nil then local AbsoluteSize_1 = PlayerGui_upv_1.Crosshair.AbsoluteSize local v57 = Camera_upv_1:ViewportPointToRay(AbsoluteSize_1.X * 0.5, AbsoluteSize_1.Y * 0.5, 0) v56 = Modules_upv_1.Components.Player.LaserRayCast(v57.Origin, v57.Direction, Runtime_upv_1.LaserSampleDistance, {Character_upv_1, Camera_upv_1, WeaponDataNew_upv_1.CameraModel, v55}) if (v56) and (v56.Position) then Runtime_upv_1.SampledLaserTarget = v56.Position else Runtime_upv_1.SampledLaserTarget = v57.Origin + (v57.Direction * Runtime_upv_1.LaserSampleDistance) end Runtime_upv_1.ActiveLocalLaserWeaponModel = v55 Modules_upv_1.Components.Weapon.SetExtraTarget(v55, Runtime_upv_1.SampledLaserTarget) return Runtime_upv_1.SampledLaserTarget end end Runtime_upv_1.SampledLaserTarget = nil if v55 then Modules_upv_1.Components.Weapon.SetExtraTarget(v55, nil) end return nil end local function UpdateMapZone() --[[ name: UpdateMapZone line: 537 upvalues: Runtime_upv_1 (copy, index: 1) Player_upv_1 (copy, index: 2) ServerFolder_upv_1 (copy, index: 3) Character_upv_1 (copy, index: 4) ClientData_upv_1 (copy, index: 5) Services_upv_1 (copy, index: 6) ]] if os.clock() - Runtime_upv_1.LastMapZoneCheck < Runtime_upv_1.MapZoneCheckRate then return end Runtime_upv_1.LastMapZoneCheck = os.clock() local v58 = false local v59, v60 = nil, nil if Player_upv_1.Team.Name ~= ServerFolder_upv_1:GetAttribute("Defender") then v59 = v58 else v60 = Character_upv_1:FindFirstChild("HumanoidRootPart") if v60 then local v61 = false if ServerFolder_upv_1:GetAttribute("Phase") ~= "Round Started" then v59 = v61 else local v62 = false if ServerFolder_upv_1:GetAttribute("GameMode") == "Skirmish" then v59 = v62 else local v63 = false if ServerFolder_upv_1:GetAttribute("GameMode") == "Invasion" then v59 = v63 else v59 = true if ServerFolder_upv_1:GetAttribute("GameMode") == "Custom" then v59 = workspace.Map:FindFirstChild(ServerFolder_upv_1:GetAttribute("Map")) and (workspace.Map:FindFirstChild(ServerFolder_upv_1:GetAttribute("Map")):GetAttribute("GameMode") == "Casual") end end end end else v59 = v60 end end if v59 ~= false then local v64 = false for _, value_9 in pairs(Character_upv_1.HumanoidRootPart:GetTouchingParts()) do if Services_upv_1.CollectionService:HasTag(value_9, "MapZone") then ClientData_upv_1.PlayerHUD.MapZone.Text = value_9.Name v64 = true break end end if v64 ~= false then return end ClientData_upv_1.PlayerHUD.MapZone.Text = "" else ClientData_upv_1.PlayerHUD.MapZone.Text = "" end end Services_upv_1.RunService.PreRender:Connect( function(a43) --[[ line: 696 upvalues: WeaponDataNew_upv_1 (copy, index: 1) WeaponAction_upv_1 (copy, index: 2) API_upv_1 (copy, index: 3) Humanoid_upv_1 (copy, index: 4) SampleLocalLaserTarget (copy, index: 5) UpdateViewmodel (copy, index: 6) UpdateLeaning (copy, index: 7) UpdateLookRotation (copy, index: 8) UpdateAttackerMovement (copy, index: 9) UpdateBarrier (copy, index: 10) UpdateMapZone (copy, index: 11) UpdateMovementSync (copy, index: 12) UpdateClimbAnimation (copy, index: 13) UpdateScopeSway (copy, index: 14) ApplyLocalLookRotationPreview (copy, index: 15) ]] local CurrentTool_1 = WeaponDataNew_upv_1.CurrentTool if CurrentTool_1 ~= nil then local v65 = a43 * 60 local v66 = API_upv_1.Movement.GetMovement() local v67 = Humanoid_upv_1.Health > 0 local v68 = (CurrentTool_1.Model ~= nil) and ((WeaponDataNew_upv_1.CameraModel ~= nil) and (WeaponDataNew_upv_1.CameraModel.Parent ~= nil)) SampleLocalLaserTarget(v66) API_upv_1.WeaponAction.SyncThrowablePreviewState() API_upv_1.Presentation.SyncSpectateAmmoState() if v67 then if v68 then UpdateViewmodel(a43, v65, v66) UpdateLeaning(v65) end UpdateLookRotation(v65) API_upv_1.Input.AdditionalMobileThumbstickFunction() API_upv_1.Movement.UpdateJumpLock(v66) end UpdateAttackerMovement() UpdateBarrier() UpdateMapZone() UpdateMovementSync(a43, v65) if v68 then UpdateClimbAnimation() API_upv_1.Movement.RuntimeMovementStateAnim() API_upv_1.Movement.UpdateSprinting(v66) API_upv_1.Movement.UpdateMovementStartWalkSpeed(v66) UpdateScopeSway(a43) end API_upv_1.Movement.UpdateMobileCrouch() if v67 then ApplyLocalLookRotationPreview() end else WeaponAction_upv_1.QuickThrowHoldActive = false WeaponAction_upv_1.QuickThrowPreviousWeaponIndex = 0 WeaponAction_upv_1.ThrowableRecoveryActive = false WeaponDataNew_upv_1.QuickAction = false API_upv_1.Movement.ResetPendingSprintExitState() API_upv_1.WeaponAction.SetThrowablePreviewBridgeState(false) end end ) local tbl_4 = {} tbl_4.SyncMovement = SyncMovement tbl_4.ApplyLocalLookRotationPreview = ApplyLocalLookRotationPreview return tbl_4 end return tbl_1