0% found this document useful (0 votes)
9 views3 pages

Auto Parry Auto Click Script

The document outlines a configuration script for an Auto Parry and Auto Click feature in a game. It includes settings for enabling Auto Parry, managing click delays, and creating a draggable UI for toggling Auto Click on and off. The script also contains logic for detecting balls and executing mouse clicks based on certain conditions related to player distance and ball speed.

Uploaded by

itaitachi41
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views3 pages

Auto Parry Auto Click Script

The document outlines a configuration script for an Auto Parry and Auto Click feature in a game. It includes settings for enabling Auto Parry, managing click delays, and creating a draggable UI for toggling Auto Click on and off. The script also contains logic for detecting balls and executing mouse clicks based on certain conditions related to player distance and ball speed.

Uploaded by

itaitachi41
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 3

-- Configuration for Auto Parry and Auto Click

getgenv().Paws = {
["AutoParry"] = true, -- Always enable Auto Parry
["PingBased"] = true,
["PingBasedOffset"] = 0,
["DistanceToParry"] = 0.5,
["BallSpeedCheck"] = true,
["SpamDelay"] = 0.1,
}

getgenv().ClickConfig = {
["AutoClick"] = false, -- Initially disabled for Auto Click
["ClickDelay"] = 0.1,
}

local Players = game:GetService("Players")


local Player = Players.LocalPlayer or Players.PlayerAdded:Wait()
local ReplicatedPaw = game:GetService("ReplicatedStorage")
local VirtualInputManager = game:GetService("VirtualInputManager")
local UserInputService = game:GetService("UserInputService")
local PawsBalls = workspace:WaitForChild("Balls", 9e9)
local PawsTable = getgenv().Paws
local ClickConfig = getgenv().ClickConfig

local function IsTheTarget()


return Player.Character:FindFirstChild("Highlight")
end

local function FindBall()


for _, v in pairs(PawsBalls:GetChildren()) do
if v:GetAttribute("realBall") == true then
return v
end
end
end

local function SendMouseClick()


VirtualInputManager:SendMouseButtonEvent(0, 0, 0, true, game, 0)
VirtualInputManager:SendMouseButtonEvent(0, 0, 0, false, game, 0)
end

local function DetectBallCurve(Ball)


local BallPosition = Ball.Position
local BallVelocity = Ball.AssemblyLinearVelocity
local Speed = BallVelocity.Magnitude

if Speed < 1 then


return false
end

if not Ball:FindFirstChild("LastPosition") then


Ball:SetAttribute("LastPosition", BallPosition)
return false
end

local LastPosition = Ball:GetAttribute("LastPosition")


local Direction = (BallPosition - LastPosition).Unit
Ball:SetAttribute("LastPosition", BallPosition)
return Direction:Dot(BallVelocity.Unit) < 0.5
end

-- Draggable UI for Auto Click Toggle


local ui = Instance.new("ScreenGui")
ui.Name = "AutoClickUI"
ui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
ui.ResetOnSpawn = false

local mainFrame = Instance.new("Frame")


mainFrame.Parent = ui
mainFrame.Size = UDim2.new(0, 200, 0, 50)
mainFrame.Position = UDim2.new(0.5, -100, 0.5, -25)
mainFrame.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
mainFrame.BorderSizePixel = 0
mainFrame.AnchorPoint = Vector2.new(0.5, 0.5)

local toggleButton = Instance.new("TextButton")


toggleButton.Parent = mainFrame
toggleButton.Size = UDim2.new(1, 0, 1, 0)
toggleButton.BackgroundColor3 = Color3.fromRGB(255, 0, 0)
toggleButton.Text = "Auto Click Disabled"
toggleButton.TextColor3 = Color3.fromRGB(255, 255, 255)
toggleButton.TextSize = 18

-- Draggable UI Logic for both PC and Mobile


local dragging = false
local dragInput, mousePos, framePos

local function updateDragPosition(input)


local delta = input.Position - mousePos
mainFrame.Position = UDim2.new(framePos.X.Scale, framePos.X.Offset + delta.X,
framePos.Y.Scale, framePos.Y.Offset + delta.Y)
end

mainFrame.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 or
input.UserInputType == Enum.UserInputType.Touch then
dragging = true
mousePos = input.Position
framePos = mainFrame.Position
end
end)

mainFrame.InputEnded:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 or
input.UserInputType == Enum.UserInputType.Touch then
dragging = false
end
end)

UserInputService.InputChanged:Connect(function(input)
if dragging then
updateDragPosition(input)
end
end)

-- Toggle Auto Click Logic


toggleButton.MouseButton1Click:Connect(function()
ClickConfig.AutoClick = not ClickConfig.AutoClick
toggleButton.Text = ClickConfig.AutoClick and "Auto Click Enabled" or "Auto
Click Disabled"
end)

-- Main Functionality for Auto Parry and Auto Click


game:GetService("RunService").PreRender:Connect(function()
if not FindBall() then return end
local Ball = FindBall()
local BallPosition = Ball.Position
local BallVelocity = Ball.AssemblyLinearVelocity.Magnitude
local Distance = Player:DistanceFromCharacter(BallPosition)

-- Auto Parry: Always enabled


if PawsTable.BallSpeedCheck and BallVelocity == 0 then return end
if (Distance / BallVelocity) <= PawsTable.DistanceToParry and IsTheTarget() and
PawsTable.AutoParry then
SendMouseClick()
end

-- Auto Click: Enable or disable based on toggle


if ClickConfig.AutoClick then
SendMouseClick()
end
end)

You might also like