local Workspace = game:GetService("Workspace") local VIM = game:GetService("VirtualInputManager") local UIS = game:GetService("UserInputService") local camera = Workspace.CurrentCamera local projectileFolder = Workspace:WaitForChild("Projectile") local targetAttacks = { ["SorcusBlade"] = true, ["BigStar"] = true, ["SuperStar"] = true } local isMobile = UIS.TouchEnabled local touchCounter = 1 local function autoTapTarget(targetObj) if targetAttacks[targetObj.Name] then local targetPart = targetObj:IsA("BasePart") and targetObj or targetObj:FindFirstChildWhichIsA("BasePart", true) if targetPart then while targetObj and targetObj.Parent and targetPart.Transparency < 1 do local screenPos, onScreen = camera:WorldToViewportPoint(targetPart.Position) if onScreen then if isMobile then local currentTouchId = touchCounter touchCounter = touchCounter + 1 VIM:SendTouchEvent(currentTouchId, 0, screenPos.X, screenPos.Y) task.wait(0.02) VIM:SendTouchEvent(currentTouchId, 2, screenPos.X, screenPos.Y) else VIM:SendMouseButtonEvent(screenPos.X, screenPos.Y, 0, true, game, 1) task.wait(0.02) VIM:SendMouseButtonEvent(screenPos.X, screenPos.Y, 0, false, game, 1) end end task.wait(0.05) end end end end for _, child in ipairs(projectileFolder:GetChildren()) do task.spawn(autoTapTarget, child) end projectileFolder.ChildAdded:Connect(function(child) task.wait(0.05) task.spawn(autoTapTarget, child) end)