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

Auto Parry Auto Click Script

The document outlines a script for a game that includes configurations for automatic clicking and parrying actions. It sets up user interface elements for toggling auto-click functionality and defines functions to detect and interact with game objects, specifically balls. The script continuously checks conditions to execute mouse clicks based on player proximity to the balls and their velocities.

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)
103 views3 pages

Auto Parry Auto Click Script

The document outlines a script for a game that includes configurations for automatic clicking and parrying actions. It sets up user interface elements for toggling auto-click functionality and defines functions to detect and interact with game objects, specifically balls. The script continuously checks conditions to execute mouse clicks based on player proximity to the balls and their velocities.

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

getgenv().

Paws = {
["AutoParry"] = true,
["PingBased"] = true,
["PingBasedOffset"] = 0,
["DistanceToParry"] = 0.5,
["BallSpeedCheck"] = true,
["SpamDelay"] = 0.1,
}

getgenv().ClickConfig = {
["AutoClick"] = false,
["ClickDelay"] = 0.001,
}

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

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.95, -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

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)

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

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)

if PawsTable.BallSpeedCheck and BallVelocity == 0 then return end


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

if ClickConfig.AutoClick then
SendMouseClick()
end
end)

You might also like