--counter 1 local Players = game:GetService("Players") local RunService = game:GetService("RunService") local VirtualInputManager = game:GetService("VirtualInputManager") local localPlayer = Players.LocalPlayer local screenGui = Instance.new("ScreenGui") screenGui.Name = "autocounter" screenGui.ResetOnSpawn = false screenGui.Parent = localPlayer:WaitForChild("PlayerGui") local frame = Instance.new("Frame") frame.Size = UDim2.new(0, 150, 0, 75) frame.Position = UDim2.new(0.5, -75, 0.5, -37.5) frame.BackgroundColor3 = Color3.fromRGB(168, 152, 255) frame.Parent = screenGui local button = Instance.new("TextButton") button.Size = UDim2.new(0, 75, 0, 37.5) button.Position = UDim2.new(0.5, -37.5, 0.5, -18.75) button.Text = "OFF" button.BackgroundColor3 = Color3.fromRGB(0, 0, 255) button.Parent = frame local dragging, dragStart, startPos frame.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then dragging = true dragStart = input.Position startPos = frame.Position end end) frame.InputChanged:Connect(function(input) if dragging and (input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch) then local delta = input.Position - dragStart frame.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y) end end) frame.InputEnded:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then dragging = false end end) local isOn = false button.MouseButton1Click:Connect(function() isOn = not isOn button.Text = isOn and "ON" or "OFF" end) local targetIds = { [14136436157] = true, [14001963401] = true, [13997092940] = true, [14004222985] = true, [13295936866] = true, [13295919399] = true, [13296577783] = true, [13491635433] = true, [17889471098] = true, [17889461810] = true, [17889458563] = true, [16515448089] = true, [16515520431] = true, [16515503507] = true, [15162694192] = true, [15240176873] = true, [15240216931] = true, [15259161390] = true, [13378751717] = true, [13378708199] = true, [13390230973] = true, [13370310513] = true, [10469639222] = true, [10469630950] = true, [10469493270] = true, [10503381238] = true, [10470104242] = true, [13532604085] = true, [13532600125] = true, [13532562418] = true } local animationStartTimes = {} local function activateAndDeactivateTool() local backpack = localPlayer:FindFirstChild("Backpack") if not backpack then return end local tool = backpack:FindFirstChild("Prey's Peril") or backpack:FindFirstChild("Split Second Counter") if tool and tool:IsA("Tool") then tool.Parent = localPlayer.Character tool.Parent = backpack end end local function getCurrentAnimationIds(player) local character = player.Character if not character then return {} end local humanoid = character:FindFirstChild("Humanoid") if not humanoid then return {} end local animator = humanoid:FindFirstChild("Animator") if not animator then return {} end local animData = {} for _, track in pairs(animator:GetPlayingAnimationTracks()) do if track.IsPlaying then local animId = tonumber(track.Animation.AnimationId:match("%d+$")) if animId then animData[animId] = track.TimePosition end end end return animData end local function checkPlayers() if not isOn then return end local localCharacter = localPlayer.Character if not localCharacter or not localCharacter.PrimaryPart then return end local localPosition = localCharacter.PrimaryPart.Position for _, player in pairs(Players:GetPlayers()) do if player ~= localPlayer then local character = player.Character if character and character.PrimaryPart then local distance = (character.PrimaryPart.Position - localPosition).Magnitude if distance <= 5.5 then local currentAnimData = getCurrentAnimationIds(player) local prevAnims = animationStartTimes[player] or {} for animId, timePosition in pairs(currentAnimData) do if not prevAnims[animId] then prevAnims[animId] = timePosition end local elapsedTime = timePosition - (prevAnims[animId] or timePosition) if targetIds[animId] and elapsedTime <= 0.1 then activateAndDeactivateTool() end end animationStartTimes[player] = currentAnimData else animationStartTimes[player] = nil end else animationStartTimes[player] = nil end end end end RunService.RenderStepped:Connect(checkPlayers)