-- ModuleScript MovementController (via decompile) local tbl_1 = {} function tbl_1.init(a1) --[[ name: init line: 4 ]] local Services_upv_1 = a1.Services local Refs_upv_1 = a1.Refs local Modules_upv_1 = a1.Modules local State_upv_1 = a1.State local API_upv_1 = a1.API local Player_upv_1 = Refs_upv_1.Player local Character_upv_1 = Refs_upv_1.Character local Humanoid_upv_1 = Refs_upv_1.Humanoid local Script_upv_1 = Refs_upv_1.Script local ServerFolder_upv_1 = Refs_upv_1.ServerFolder local ClientData_upv_1 = State_upv_1.ClientData local WeaponDataNew_upv_1 = State_upv_1.WeaponDataNew local Movement_upv_1 = State_upv_1.Movement local function IsWeaponPresentationReady() --[[ name: IsWeaponPresentationReady line: 27 upvalues: Script_upv_1 (copy, index: 1) ]] local v1 = (Script_upv_1:GetAttribute("WeaponReady") == true) and (Script_upv_1:GetAttribute("SwapInProgress") ~= true) return v1 end local function GetLean() --[[ name: GetLean line: 50 upvalues: Script_upv_1 (copy, index: 1) ]] return Script_upv_1:GetAttribute("Lean") or 0 end local function GetToolWalkSpeedModifier() --[[ name: GetToolWalkSpeedModifier line: 72 upvalues: Character_upv_1 (copy, index: 1) ]] if not Character_upv_1 then return 0 end local v2 = Character_upv_1:FindFirstChildOfClass("Tool") if v2 == nil then return 0 end local v3 = v2:GetAttribute("Weight") or 0 if v3 > 4.5 then return ((v3 - 4.5) / 20) * -1 elseif v3 < 2.5 then return (2.5 - v3) / 20 else return 0 end end local function IsADSWalkSpeedState(a2) --[[ name: IsADSWalkSpeedState line: 92 upvalues: WeaponDataNew_upv_1 (copy, index: 1) ]] local CurrentTool_1 = WeaponDataNew_upv_1.CurrentTool local v4 = false local v5 if CurrentTool_1 == nil then v5 = v4 else v5 = false if CurrentTool_1.Aiming == true then v5 = true if a2 ~= "Walking" then v5 = true if a2 ~= "Standing" then v5 = a2 == "Creeping" end end end end return v5 end local function ResolveMovementSpeedState(a3) --[[ name: ResolveMovementSpeedState line: 99 upvalues: WeaponDataNew_upv_1 (copy, index: 1) ]] local CurrentTool_2 = WeaponDataNew_upv_1.CurrentTool local v6 = false local v7 if CurrentTool_2 == nil then v7 = v6 else v7 = false if CurrentTool_2.Aiming == true then v7 = true if a3 ~= "Walking" then v7 = true if a3 ~= "Standing" then v7 = a3 == "Creeping" end end end end if v7 ~= true then return a3 end return "Creeping" end local function GetVestWalkSpeedModifier() --[[ name: GetVestWalkSpeedModifier line: 64 upvalues: Services_upv_1 (copy, index: 1) Player_upv_1 (copy, index: 2) ]] local v8 = Services_upv_1.ReplicatedStorage.Items.Vest:FindFirstChild(Player_upv_1.PlayerData.Loadout[Player_upv_1.PlayerData.Settings:GetAttribute("LoadoutName")]:GetAttribute("Vest")) if v8 == nil then return 0 end return (v8:GetAttribute("WalkSpeed") or 0) / 100 end local function GetMovementBaseSpeed(a4) --[[ name: GetMovementBaseSpeed line: 106 upvalues: WeaponDataNew_upv_1 (copy, index: 1) Modules_upv_1 (copy, index: 2) ]] local CurrentTool_3 = WeaponDataNew_upv_1.CurrentTool local v9 = false local v10 if CurrentTool_3 == nil then v10 = v9 else v10 = false if CurrentTool_3.Aiming == true then v10 = true if a4 ~= "Walking" then v10 = true if a4 ~= "Standing" then v10 = a4 == "Creeping" end end end end local v11 if v10 ~= true then v11 = a4 else v11 = "Creeping" end if v11 ~= "Walking" then if v11 ~= "Creeping" then if v11 ~= "Running" then if v11 ~= "Proning" then if v11 ~= "Crouching" then if v11 ~= "Standing" then return 0 end return Modules_upv_1.Config.NormalWalkSpeed end return Modules_upv_1.Config.CrouchWalkSpeed end return Modules_upv_1.Config.ProneWalksSpeed end return Modules_upv_1.Config.RunWalkSpeed end return Modules_upv_1.Config.SlowPaceWalkSpeed end return Modules_upv_1.Config.NormalWalkSpeed end local function StopWalkSpeedTween() --[[ name: StopWalkSpeedTween line: 157 upvalues: Movement_upv_1 (copy, index: 1) ]] if not Movement_upv_1.ActiveWalkSpeedTween then return end Movement_upv_1.ActiveWalkSpeedTween:Cancel() Movement_upv_1.ActiveWalkSpeedTween = nil end local function CalculateTargetWalkSpeed(a5) --[[ name: CalculateTargetWalkSpeed line: 125 upvalues: WeaponDataNew_upv_1 (copy, index: 1) GetMovementBaseSpeed (copy, index: 2) GetVestWalkSpeedModifier (copy, index: 3) Character_upv_1 (copy, index: 4) Modules_upv_1 (copy, index: 5) ServerFolder_upv_1 (copy, index: 6) Player_upv_1 (copy, index: 7) ]] local CurrentTool_4 = WeaponDataNew_upv_1.CurrentTool local v12 = false local v13 if CurrentTool_4 == nil then v13 = v12 else v13 = false if CurrentTool_4.Aiming == true then v13 = true if a5 ~= "Walking" then v13 = true if a5 ~= "Standing" then v13 = a5 == "Creeping" end end end end local v14 if v13 ~= true then v14 = a5 else v14 = "Creeping" end local v15 = GetMovementBaseSpeed(a5) if v15 <= 0 then return 0 end local v16 = GetVestWalkSpeedModifier() local v17, v18 = nil, nil if Character_upv_1 then v17 = Character_upv_1:FindFirstChildOfClass("Tool") if v17 ~= nil then local v19 = v17:GetAttribute("Weight") or 0 v18 = ((v19 > 4.5) and ((v19 - 4.5) / 20 * -1)) or (((v19 < 2.5) and ((2.5 - v19) / 20)) or 0) else v18 = 0 end else v18 = 0 end local v20 = v15 + (v16 * v15) + v18 * v15 local v21 = nil if v14 == "Creeping" then v21 = WeaponDataNew_upv_1.CurrentTool local v22 = false local v23 if v21 == nil then v23 = v22 else v23 = false if v21.Aiming == true then v23 = true if a5 ~= "Walking" then v23 = true if a5 ~= "Standing" then v23 = a5 == "Creeping" end end end end if v23 == true then local _ = Modules_upv_1.Config.NormalWalkSpeed v20 = math.max(v20, (Modules_upv_1.Config.NormalWalkSpeed + v16 * Modules_upv_1.Config.NormalWalkSpeed + v18 * Modules_upv_1.Config.NormalWalkSpeed) * 0.9) end end if ServerFolder_upv_1:GetAttribute("SpeedMode") == true and ServerFolder_upv_1:GetAttribute("GameMode") == "Custom" then v20 = v20 * 2.5 end if Character_upv_1 then local v24 = Character_upv_1:GetAttribute("Frost") if v24 then v20 = ((Character_upv_1:GetAttribute("Frost") > 0) and (v20 * 0.3)) or v20 end end if Player_upv_1.Team and Player_upv_1.Team.Name == ServerFolder_upv_1:GetAttribute("Attacker") and ServerFolder_upv_1:GetAttribute("AttackerMovement") == false then return 0 end return v20 end local function TweenWalkSpeed(a6, a7) --[[ name: TweenWalkSpeed line: 164 upvalues: Movement_upv_1 (copy, index: 1) Humanoid_upv_1 (copy, index: 2) Modules_upv_1 (copy, index: 3) ]] if Movement_upv_1.ActiveWalkSpeedTween then Movement_upv_1.ActiveWalkSpeedTween:Cancel() Movement_upv_1.ActiveWalkSpeedTween = nil end if a6 <= 0 then Humanoid_upv_1.WalkSpeed = 0 else if a7 == true then Humanoid_upv_1.WalkSpeed = a6 * 0.75 end local u1 = Modules_upv_1.Components.Menu.TweenCreate(Humanoid_upv_1, {WalkSpeed = a6}, Enum.EasingStyle.Sine, Movement_upv_1.MovementStartTweenDuration, false) Movement_upv_1.ActiveWalkSpeedTween = u1 u1.Completed:Connect( function() --[[ line: 177 upvalues: Movement_upv_1 (copy, index: 1) u1 (copy, index: 2) ]] if Movement_upv_1.ActiveWalkSpeedTween ~= u1 then return end Movement_upv_1.ActiveWalkSpeedTween = nil end ) end end local function UpdateWalkSpeedClient(a8, a9) --[[ name: UpdateWalkSpeedClient line: 184 upvalues: Humanoid_upv_1 (copy, index: 1) ServerFolder_upv_1 (copy, index: 2) Movement_upv_1 (copy, index: 3) CalculateTargetWalkSpeed (copy, index: 4) TweenWalkSpeed (copy, index: 5) ]] if not (Humanoid_upv_1.Health > 0) then return end if ServerFolder_upv_1:GetAttribute("Countdown") <= 0 then local v25 if Movement_upv_1.PendingSprintExitActive == true and Movement_upv_1.PendingSprintExitMovement ~= nil and (a8 == "Standing" or a8 == "Walking") then v25 = Movement_upv_1.PendingSprintExitMovement else v25 = a8 end local v26 = CalculateTargetWalkSpeed(v25) if v25 == "Proning" or v25 == "Crouching" or v25 == "Freezing" then Humanoid_upv_1.JumpPower = 0 end TweenWalkSpeed(v26, a9 == true) Movement_upv_1.LastAppliedWalkState = v25 end end local function GetSprintExitRecoverySettings(a10) --[[ name: GetSprintExitRecoverySettings line: 273 ]] if a10 ~= "Proning" then return 0.2, -0.25 end return 0.35, -0.75 end local function SetMovement(a11, a12) --[[ name: SetMovement line: 31 upvalues: Player_upv_1 (copy, index: 1) Script_upv_1 (copy, index: 2) WeaponDataNew_upv_1 (copy, index: 3) ]] local v27 = a12 ~= false if a11 ~= "Crouching" and a11 ~= "Proning" then if v27 == true then if a11 ~= "Standing" and (a11 ~= "Running" or Script_upv_1:GetAttribute("Movement") ~= "Proning" and Script_upv_1:GetAttribute("Movement") ~= "Crouching") then Script_upv_1:SetAttribute("Movement", a11) return end WeaponDataNew_upv_1:SoundCue("Stand", true) end Script_upv_1:SetAttribute("Movement", a11) return end if Player_upv_1.ServerData:GetAttribute("Alive") ~= true then return end Script_upv_1:SetAttribute("Movement", a11) if a11 == "Proning" then WeaponDataNew_upv_1:SoundCue("Prone", true) elseif a11 == "Crouching" then WeaponDataNew_upv_1:SoundCue("Crouch", true) end end local function GetMovement() --[[ name: GetMovement line: 23 upvalues: Script_upv_1 (copy, index: 1) ]] return Script_upv_1:GetAttribute("Movement") end ClientData_upv_1.CrouchingHoldTimer = os.clock() Script_upv_1:SetAttribute("IsMoving", false) Services_upv_1.ContentProvider:PreloadAsync({WeaponDataNew_upv_1.Animations.Server.CrouchIdle, WeaponDataNew_upv_1.Animations.Server.CrouchWalk, WeaponDataNew_upv_1.Animations.Server.ProneWalk, WeaponDataNew_upv_1.Animations.Server.ProneIdle}) local function StanceConfig() --[[ name: StanceConfig line: 437 upvalues: Script_upv_1 (copy, index: 1) WeaponDataNew_upv_1 (copy, index: 2) Refs_upv_1 (copy, index: 3) GetMovement (copy, index: 4) Movement_upv_1 (copy, index: 5) ClientData_upv_1 (copy, index: 6) Modules_upv_1 (copy, index: 7) Humanoid_upv_1 (copy, index: 8) API_upv_1 (copy, index: 9) CalculateTargetWalkSpeed (copy, index: 10) State_upv_1 (copy, index: 11) UpdateWalkSpeedClient (copy, index: 12) ]] Script_upv_1:GetAttributeChangedSignal("Movement"):Connect( function() --[[ line: 438 upvalues: WeaponDataNew_upv_1 (copy, index: 1) Refs_upv_1 (copy, index: 2) GetMovement (copy, index: 3) Script_upv_1 (copy, index: 4) Movement_upv_1 (copy, index: 5) ClientData_upv_1 (copy, index: 6) Modules_upv_1 (copy, index: 7) Humanoid_upv_1 (copy, index: 8) API_upv_1 (copy, index: 9) CalculateTargetWalkSpeed (copy, index: 10) State_upv_1 (copy, index: 11) UpdateWalkSpeedClient (copy, index: 12) ]] if WeaponDataNew_upv_1.CurrentTool ~= nil then Refs_upv_1.GameEvents.ChangeMovement:FireServer(GetMovement()) Refs_upv_1.GameEvents.Stance:FireServer(Script_upv_1:GetAttribute("Movement"), Script_upv_1:GetAttribute("Lean") or 0) if Script_upv_1:GetAttribute("Movement") == "Standing" or Script_upv_1:GetAttribute("Movement") == "Freezing" then Movement_upv_1.WasActivelyMoving = false if Movement_upv_1.ActiveWalkSpeedTween then Movement_upv_1.ActiveWalkSpeedTween:Cancel() Movement_upv_1.ActiveWalkSpeedTween = nil end end if Script_upv_1:GetAttribute("Movement") == "Standing" then WeaponDataNew_upv_1:PlayServerHold() ClientData_upv_1.CameraY = 0 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(Script_upv_1:GetAttribute("Lean") or 0, ClientData_upv_1.CameraY, 0)}, Enum.EasingStyle.Sine, 0.3) elseif Script_upv_1:GetAttribute("Movement") == "Crouching" then WeaponDataNew_upv_1:PlayServerHold() WeaponDataNew_upv_1.Animations.Client.Run:Stop(0.12) WeaponDataNew_upv_1:SoundCue("Run", false) ClientData_upv_1.CameraY = -1.6 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(Script_upv_1:GetAttribute("Lean") or 0, ClientData_upv_1.CameraY, 0)}, Enum.EasingStyle.Sine, 0.3) elseif Script_upv_1:GetAttribute("Movement") == "Proning" then WeaponDataNew_upv_1:PlayServerHold() WeaponDataNew_upv_1.Animations.Client.Run:Stop(0.12) WeaponDataNew_upv_1:SoundCue("Run", false) ClientData_upv_1.CameraY = -3.25 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(Script_upv_1:GetAttribute("Lean") or 0, ClientData_upv_1.CameraY, 0)}, Enum.EasingStyle.Quad, 0.5) elseif Script_upv_1:GetAttribute("Movement") ~= "Running" or not (WeaponDataNew_upv_1.Animations.Client.Run) then if Script_upv_1:GetAttribute("Movement") == "Walking" and WeaponDataNew_upv_1.Animations.Client.Run then WeaponDataNew_upv_1.Animations.Client.Run:Stop(0.12) WeaponDataNew_upv_1:PlayServerHold() WeaponDataNew_upv_1:SoundCue("Run", false) ClientData_upv_1.CameraY = 0 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(Script_upv_1:GetAttribute("Lean") or 0, ClientData_upv_1.CameraY, 0)}, Enum.EasingStyle.Sine, 0.3) end elseif ClientData_upv_1.ForwardMovement ~= 0 then local CurrentTool_5 = WeaponDataNew_upv_1.CurrentTool local v28 = Script_upv_1:GetAttribute("ServerVaultOverride") == true if API_upv_1.WeaponAction and API_upv_1.WeaponAction.AimDownSightRelease then API_upv_1.WeaponAction.AimDownSightRelease() end if v28 ~= true then WeaponDataNew_upv_1:StopServerHold() end WeaponDataNew_upv_1.Animations.Client.Run:Play(0.2) WeaponDataNew_upv_1:SoundCue("Run", true) WeaponDataNew_upv_1.Animations.Client.Run:AdjustSpeed((0.67 / Modules_upv_1.Config.RunWalkSpeed) * CalculateTargetWalkSpeed(GetMovement())) ClientData_upv_1.CameraY = 0 if Movement_upv_1.StanceCurrentTween then Movement_upv_1.StanceCurrentTween:Cancel() end if CurrentTool_5 and CurrentTool_5.Aiming == true or not (API_upv_1.Presentation) or not (API_upv_1.Presentation.TweenFOV) then UpdateWalkSpeedClient(GetMovement()) if API_upv_1.Presentation and API_upv_1.Presentation.PushSpectatePresentationState then API_upv_1.Presentation.PushSpectatePresentationState({Movement = Script_upv_1:GetAttribute("Movement"), Lean = Script_upv_1:GetAttribute("Lean") or 0}) end return end API_upv_1.Presentation.TweenFOV(State_upv_1.PlayerSettings:GetAttribute("FieldOfView"), 0.15) end UpdateWalkSpeedClient(GetMovement()) if API_upv_1.Presentation and API_upv_1.Presentation.PushSpectatePresentationState then API_upv_1.Presentation.PushSpectatePresentationState({Movement = Script_upv_1:GetAttribute("Movement"), Lean = Script_upv_1:GetAttribute("Lean") or 0}) end else return nil end end ) Script_upv_1:GetAttributeChangedSignal("Lean"):Connect( function() --[[ line: 503 upvalues: Refs_upv_1 (copy, index: 1) GetMovement (copy, index: 2) Script_upv_1 (copy, index: 3) Movement_upv_1 (copy, index: 4) Modules_upv_1 (copy, index: 5) Humanoid_upv_1 (copy, index: 6) ClientData_upv_1 (copy, index: 7) API_upv_1 (copy, index: 8) ]] Refs_upv_1.GameEvents.ChangeMovement:FireServer(GetMovement()) Refs_upv_1.GameEvents.Stance:FireServer(Script_upv_1:GetAttribute("Movement"), Script_upv_1:GetAttribute("Lean") or 0) 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(Script_upv_1:GetAttribute("Lean") or 0, ClientData_upv_1.CameraY, 0)}, Enum.EasingStyle.Sine, 0.4) if not API_upv_1.Presentation or not API_upv_1.Presentation.PushSpectatePresentationState then return end API_upv_1.Presentation.PushSpectatePresentationState({Movement = Script_upv_1:GetAttribute("Movement"), Lean = Script_upv_1:GetAttribute("Lean") or 0}) end ) end StanceConfig() task.spawn( function() --[[ line: 518 upvalues: Script_upv_1 (copy, index: 1) ]] Script_upv_1:SetAttribute("Movement", "Standing") end ) local tbl_2 = {} tbl_2.GetMovement = GetMovement tbl_2.SetMovement = SetMovement tbl_2.GetLean = GetLean function tbl_2.SetLean(a13) --[[ name: SetLean line: 54 upvalues: Script_upv_1 (copy, index: 1) WeaponDataNew_upv_1 (copy, index: 2) ]] if Script_upv_1:GetAttribute("Movement") ~= "Running" and Script_upv_1:GetAttribute("Movement") ~= "Proning" then Script_upv_1:SetAttribute("Lean", a13) end if a13 ~= -1 and a13 ~= 1 then return end WeaponDataNew_upv_1:SoundCue("Lean", true) end tbl_2.CalculateTargetWalkSpeed = CalculateTargetWalkSpeed tbl_2.UpdateWalkSpeedClient = UpdateWalkSpeedClient function tbl_2.UpdateMovementStartWalkSpeed(a14) --[[ name: UpdateMovementStartWalkSpeed line: 201 upvalues: Humanoid_upv_1 (copy, index: 1) Movement_upv_1 (copy, index: 2) UpdateWalkSpeedClient (copy, index: 3) ]] local v29 = Humanoid_upv_1.MoveDirection.Magnitude > 0.05 local v30 = nil if Movement_upv_1.PendingSprintExitActive ~= true then v30 = (a14 ~= "Standing") and (a14 ~= "Freezing") and v29 if v30 == true and Movement_upv_1.WasActivelyMoving == false then UpdateWalkSpeedClient(a14, true) elseif v30 ~= true or Movement_upv_1.LastAppliedWalkState == a14 then if v30 == false and Movement_upv_1.WasActivelyMoving == true and Movement_upv_1.ActiveWalkSpeedTween then Movement_upv_1.ActiveWalkSpeedTween:Cancel() Movement_upv_1.ActiveWalkSpeedTween = nil end else UpdateWalkSpeedClient(a14, false) end Movement_upv_1.WasActivelyMoving = v30 else if v29 == true then UpdateWalkSpeedClient(Movement_upv_1.PendingSprintExitMovement or "Proning", Movement_upv_1.WasActivelyMoving == false) elseif Movement_upv_1.ActiveWalkSpeedTween then Movement_upv_1.ActiveWalkSpeedTween:Cancel() Movement_upv_1.ActiveWalkSpeedTween = nil end Movement_upv_1.WasActivelyMoving = v29 end end function tbl_2.RuntimeMovementStateAnim() --[[ name: RuntimeMovementStateAnim line: 227 upvalues: Character_upv_1 (copy, index: 1) Movement_upv_1 (copy, index: 2) Script_upv_1 (copy, index: 3) WeaponDataNew_upv_1 (copy, index: 4) ]] if not Character_upv_1 then return end if Character_upv_1.PrimaryPart then Movement_upv_1.IsMoving = (Character_upv_1.PrimaryPart.AssemblyLinearVelocity * Vector3.new(1, 0, 1)).Magnitude > 1 local v31 = Script_upv_1:GetAttribute("Movement") if Movement_upv_1.PrevMovementState ~= v31 or Movement_upv_1.PrevMoving ~= Movement_upv_1.IsMoving then if Movement_upv_1.PrevMovementState ~= "Crouching" or Movement_upv_1.PrevMovementState == v31 then if Movement_upv_1.PrevMovementState == "Proning" and Movement_upv_1.PrevMovementState ~= v31 then WeaponDataNew_upv_1.Animations.Server.ProneIdle:Stop(0.35) WeaponDataNew_upv_1.Animations.Server.ProneWalk:Stop(0.35) end else WeaponDataNew_upv_1.Animations.Server.CrouchIdle:Stop(0.35) WeaponDataNew_upv_1.Animations.Server.CrouchWalk:Stop(0.35) end if v31 ~= "Crouching" then if v31 == "Proning" then if Movement_upv_1.PrevMoving == false and Movement_upv_1.IsMoving == true then WeaponDataNew_upv_1.Animations.Server.ProneIdle:Stop(0.35) elseif Movement_upv_1.PrevMoving == true and Movement_upv_1.IsMoving == false then WeaponDataNew_upv_1.Animations.Server.ProneWalk:Stop(0.35) end end elseif Movement_upv_1.PrevMoving == false and Movement_upv_1.IsMoving == true then WeaponDataNew_upv_1.Animations.Server.CrouchIdle:Stop(0.35) elseif Movement_upv_1.PrevMoving == true and Movement_upv_1.IsMoving == false then WeaponDataNew_upv_1.Animations.Server.CrouchWalk:Stop(0.35) end if v31 == "Crouching" and Movement_upv_1.IsMoving == true then WeaponDataNew_upv_1.Animations.Server.CrouchWalk:Play(0.35) WeaponDataNew_upv_1.Animations.Server.CrouchWalk:AdjustSpeed(0.6) elseif v31 == "Crouching" and Movement_upv_1.IsMoving == false then WeaponDataNew_upv_1.Animations.Server.CrouchIdle:Play(0.35) elseif v31 == "Proning" and Movement_upv_1.IsMoving == true then WeaponDataNew_upv_1.Animations.Server.ProneWalk:Play(0.35) elseif v31 == "Proning" and Movement_upv_1.IsMoving == false then WeaponDataNew_upv_1.Animations.Server.ProneIdle:Play(0.35) end end Movement_upv_1.PrevMovementState = v31 Movement_upv_1.PrevMoving = Movement_upv_1.IsMoving end end function tbl_2.UpdateSprinting(a15) --[[ name: UpdateSprinting line: 286 upvalues: Character_upv_1 (copy, index: 1) WeaponDataNew_upv_1 (copy, index: 2) Script_upv_1 (copy, index: 3) Movement_upv_1 (copy, index: 4) API_upv_1 (copy, index: 5) SetMovement (copy, index: 6) ClientData_upv_1 (copy, index: 7) Humanoid_upv_1 (copy, index: 8) ]] if not Character_upv_1 then return end if Character_upv_1.PrimaryPart and WeaponDataNew_upv_1.CurrentTool ~= nil then local v32 = (Script_upv_1:GetAttribute("WeaponReady") == true) and (Script_upv_1:GetAttribute("SwapInProgress") ~= true) if v32 == true and Character_upv_1:GetAttribute("Spawning") ~= true then local v33 = Character_upv_1:GetAttribute("Barricading") == true if v33 ~= true then local v34 = API_upv_1.WeaponAction and (API_upv_1.WeaponAction.IsSprintBlockedByHardAction and (API_upv_1.WeaponAction.IsSprintBlockedByHardAction() == true)) local v35 = API_upv_1.WeaponAction and (API_upv_1.WeaponAction.IsInspectBlockingSprint and (API_upv_1.WeaponAction.IsInspectBlockingSprint() == true)) local v36 = true if v34 ~= true then if v35 == true then local _ = true else local _ = false end end local v37 = (Character_upv_1.PrimaryPart.AssemblyLinearVelocity * Vector3.new(1, 0, 1)).Magnitude > 1 local v38 = os.clock() local v39 = ((WeaponDataNew_upv_1.GetStateFolder) and (WeaponDataNew_upv_1:GetStateFolder())) or nil local v40 = Script_upv_1:GetAttribute("ServerVaultOverride") == true if v40 ~= true and v39 then v40 = v39:GetAttribute("VaultActive") == true end if v40 == true and Script_upv_1:GetAttribute("ServerVaultOverride") ~= true then local Animations_1 = WeaponDataNew_upv_1.Animations local _ = Animations_1 and (WeaponDataNew_upv_1.Animations.Server and (WeaponDataNew_upv_1.Animations.Server.Vault)) local Animations_2 = WeaponDataNew_upv_1.Animations local v49 = Animations_2 and (WeaponDataNew_upv_1.Animations.Client and (WeaponDataNew_upv_1.Animations.Client.Vault)) local v41 = Animations_1 and (Animations_1.IsPlaying == true) local v42 = Animations_2 and (Animations_2.IsPlaying == true) if v41 ~= true and v42 ~= true then local v43 = false if v39 and v39:GetAttribute("VaultActive") == true then v39:SetAttribute("VaultActive", false) end v40 = v43 end end if v40 ~= true then if a15 ~= "Proning" and a15 ~= "Crouching" then local v44 = nil if Movement_upv_1.PendingSprintExitActive == true then v44 = Movement_upv_1.PendingSprintExitMovement if v44 ~= nil and ClientData_upv_1.RunningHold == true and v36 ~= true then if v37 == true then local v45 = ((v44 ~= "Proning") and -0.25) or -0.75 if v38 < Movement_upv_1.PendingSprintExitResumeAt and Humanoid_upv_1.CameraOffset.Y < v45 then if a15 ~= "Standing" then Script_upv_1:SetAttribute("Movement", "Standing") end return end Movement_upv_1.PendingSprintExitResumeAt = 0 Movement_upv_1.PendingSprintExitActive = false Movement_upv_1.PendingSprintExitMovement = nil if Script_upv_1:GetAttribute("Movement") ~= "Running" and Script_upv_1:GetAttribute("Movement") ~= "Proning" then Script_upv_1:SetAttribute("Lean", 0) end if a15 ~= "Running" then if Script_upv_1:GetAttribute("Movement") == "Proning" or Script_upv_1:GetAttribute("Movement") == "Crouching" then WeaponDataNew_upv_1:SoundCue("Stand", true) end Script_upv_1:SetAttribute("Movement", "Running") end else Movement_upv_1.PendingSprintExitResumeAt = 0 Movement_upv_1.PendingSprintExitActive = false Movement_upv_1.PendingSprintExitMovement = nil if a15 ~= "Standing" then Script_upv_1:SetAttribute("Movement", "Standing") end end return end Movement_upv_1.PendingSprintExitResumeAt = 0 Movement_upv_1.PendingSprintExitActive = false Movement_upv_1.PendingSprintExitMovement = nil end if v37 ~= false then if ClientData_upv_1.RunningHold == true and v34 ~= true and v35 == true then if API_upv_1.WeaponAction and API_upv_1.WeaponAction.TryCancelInspectForSprint then API_upv_1.WeaponAction.TryCancelInspectForSprint() end return end if ((ClientData_upv_1.RunningHold == true) and (v36 ~= true)) ~= true then if a15 ~= "Walking" then Script_upv_1:SetAttribute("Movement", "Walking") end elseif a15 ~= "Running" then if Script_upv_1:GetAttribute("Movement") ~= "Running" and Script_upv_1:GetAttribute("Movement") ~= "Proning" then Script_upv_1:SetAttribute("Lean", 0) end if Script_upv_1:GetAttribute("Movement") == "Proning" or Script_upv_1:GetAttribute("Movement") == "Crouching" then WeaponDataNew_upv_1:SoundCue("Stand", true) end Script_upv_1:SetAttribute("Movement", "Running") return end elseif a15 ~= "Standing" then Script_upv_1:SetAttribute("Movement", "Standing") end return end if ClientData_upv_1.RunningHold == true and v37 == true and v34 ~= true and v35 == true then if API_upv_1.WeaponAction and API_upv_1.WeaponAction.TryCancelInspectForSprint then API_upv_1.WeaponAction.TryCancelInspectForSprint() end Movement_upv_1.PendingSprintExitResumeAt = 0 Movement_upv_1.PendingSprintExitActive = false Movement_upv_1.PendingSprintExitMovement = nil return end if ClientData_upv_1.RunningHold ~= true or v36 == true or v37 ~= true then Movement_upv_1.PendingSprintExitResumeAt = 0 Movement_upv_1.PendingSprintExitActive = false Movement_upv_1.PendingSprintExitMovement = nil elseif Movement_upv_1.PendingSprintExitActive ~= true then v40 = ((a15 ~= "Proning") and 0.2) or 0.35 Movement_upv_1.PendingSprintExitActive = true Movement_upv_1.PendingSprintExitMovement = a15 Movement_upv_1.PendingSprintExitResumeAt = v38 + v40 Script_upv_1:SetAttribute("Movement", "Standing") return end else Movement_upv_1.PendingSprintExitResumeAt = 0 Movement_upv_1.PendingSprintExitActive = false Movement_upv_1.PendingSprintExitMovement = nil if a15 == "Running" then SetMovement(((v37 ~= true) and "Standing") or "Walking") end end else Movement_upv_1.PendingSprintExitResumeAt = 0 Movement_upv_1.PendingSprintExitActive = false Movement_upv_1.PendingSprintExitMovement = nil end return end Movement_upv_1.PendingSprintExitResumeAt = 0 Movement_upv_1.PendingSprintExitActive = false Movement_upv_1.PendingSprintExitMovement = nil local v46 = Script_upv_1:GetAttribute("SwapInProgress") == true local v47 = false local v48 if v46 ~= true then v48 = v47 else v48 = true if a15 ~= "Proning" then v48 = a15 == "Crouching" end end if v48 ~= true and a15 ~= "Standing" then Script_upv_1:SetAttribute("Movement", "Standing") end end end function tbl_2.UpdateJumpLock(a16) --[[ name: UpdateJumpLock line: 417 upvalues: WeaponDataNew_upv_1 (copy, index: 1) Humanoid_upv_1 (copy, index: 2) Modules_upv_1 (copy, index: 3) ]] if WeaponDataNew_upv_1.Jumping ~= true and a16 ~= "Proning" then Humanoid_upv_1.JumpPower = Modules_upv_1.Config.JumpPower else Humanoid_upv_1.JumpPower = 0 end end function tbl_2.UpdateMobileCrouch() --[[ name: UpdateMobileCrouch line: 425 upvalues: Player_upv_1 (copy, index: 1) ClientData_upv_1 (copy, index: 2) Script_upv_1 (copy, index: 3) WeaponDataNew_upv_1 (copy, index: 4) ]] if (Player_upv_1:GetAttribute("OnConsole") == true or Player_upv_1:GetAttribute("OnMobile") == true) and ClientData_upv_1.CrouchingHold == true and not (os.clock() - ClientData_upv_1.CrouchingHoldTimer <= 0.2) and Script_upv_1:GetAttribute("Movement") ~= "Proning" then ClientData_upv_1.RunningHold = false if Script_upv_1:GetAttribute("Movement") ~= "Running" and Script_upv_1:GetAttribute("Movement") ~= "Proning" then Script_upv_1:SetAttribute("Lean", 0) end if Player_upv_1.ServerData:GetAttribute("Alive") == true then Script_upv_1:SetAttribute("Movement", "Proning") WeaponDataNew_upv_1:SoundCue("Prone", true) end ClientData_upv_1.CrouchingHold = false end end function tbl_2.GetWalkSpeed() --[[ name: GetWalkSpeed line: 534 upvalues: CalculateTargetWalkSpeed (copy, index: 1) Script_upv_1 (copy, index: 2) ]] return (CalculateTargetWalkSpeed(Script_upv_1:GetAttribute("Movement"))) end function tbl_2.ResetPendingSprintExitState() --[[ name: ResetPendingSprintExitState line: 280 upvalues: Movement_upv_1 (copy, index: 1) ]] Movement_upv_1.PendingSprintExitResumeAt = 0 Movement_upv_1.PendingSprintExitActive = false Movement_upv_1.PendingSprintExitMovement = nil end return tbl_2 end return tbl_1