local Rayfield = loadstring(game:HttpGet('https://[Log in to view URL]'))()

    local Window = Rayfield:CreateWindow({
   Name = "Cool Kid",
   LoadingTitle = "Cool Kid",
   LoadingSubtitle = "by blade",
   ConfigurationSaving = {
      Enabled = true,
      FolderName = nil, -- Create a custom folder for your hub/game
      FileName = "Cool Kid Hub"
   },
   Discord = {
      Enabled = True,
      Invite = "https://[Log in to view URL]", -- The Discord invite code, do not include discord.gg/. E.g. discord.gg/ABCD would be ABCD
      RememberJoins = true -- Set this to false to make them join the discord every time they load it up
   },
   KeySystem = True, -- Set this to true to use our key system
   KeySettings = {
      Title = "cool Kid key",
      Subtitle = "Join in Discord Server",
      Note = "Note join discord server for key",
      FileName = "Cool Kid Key", -- It is recommended to use something unique as other scripts using Rayfield may overwrite your key file
      SaveKey = true, -- The user's key will be saved, but if you change the key, they will be unable to use your script
      GrabKeyFromSite = True, -- If this is true, set Key below to the RAW site you would like Rayfield to get the key from
      Key = {"https://[Log in to view URL]"} -- List of keys that will be accepted by the system, can be RAW file links (pastebin, github etc) or simple strings ("hello","key22")
   }
})

local parryTab = Window:CreateTab("🏠 home", Nil) -- Title, Image
local parrySection = parryTab:CreateSection("parry")

Rayfield:Notify({
   Title = "you exucute the script",
   Content = "Notification Content",
   Duration = 6.5,
   Image = nil,
   Actions = { -- Notification Buttons
      Ignore = {
         Name = "Okay!",
         Callback = function()
         print("The user tapped Okay!")
      end
   },
},
})

local Button = parryTab:CreateButton({
   Name = "Auto Parry",
   Callback = function()
   local Debug = false -- Set this to true if you want my debug output.
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Players = game:GetService("Players")

local Player = Players.LocalPlayer or Players.PlayerAdded:Wait()
local Remotes = ReplicatedStorage:WaitForChild("Remotes", 9e9) -- A second argument in waitforchild what could it mean?
local Balls = workspace:WaitForChild("Balls", 9e9)

-- Functions

local function print(...) -- Debug print.
    if Debug then
        warn(...)
    end
end

local function VerifyBall(Ball) -- Returns nil if the ball isn't a valid projectile; true if it's the right ball.
    if typeof(Ball) == "Instance" and Ball:IsA("BasePart") and Ball:IsDescendantOf(Balls) and Ball:GetAttribute("realBall") == true then
        return true
    end
end

local function IsTarget() -- Returns true if we are the current target.
    return (Player.Character and Player.Character:FindFirstChild("Highlight"))
end

local function Parry() -- Parries.
    Remotes:WaitForChild("ParryButtonPress"):Fire()
end

-- The actual code

Balls.ChildAdded:Connect(function(Ball)
    if not VerifyBall(Ball) then
        return
    end
    
    print(`Ball Spawned: {Ball}`)
    
    local OldPosition = Ball.Position
    local OldTick = tick()
    
    Ball:GetPropertyChangedSignal("Position"):Connect(function()
        if IsTarget() then -- No need to do the math if we're not being attacked.
            local Distance = (Ball.Position - workspace.CurrentCamera.Focus.Position).Magnitude
            local Velocity = (OldPosition - Ball.Position).Magnitude -- Fix for .Velocity not working. Yes I got the lowest possible grade in accuplacer math.
            
            print(`Distance: {Distance}\nVelocity: {Velocity}\nTime: {Distance / Velocity}`)
        
            if (Distance / Velocity) <= 10 then -- Sorry for the magic number. This just works. No, you don't get a slider for this because it's 2am.
                Parry()
            end
        end
        
        if (tick() - OldTick >= 1/60) then -- Don't want it to update too quickly because my velocity implementation is aids. Yes, I tried Ball.Velocity. No, it didn't work.
            OldTick = tick()
            OldPosition = Ball.Position
        end
    end)
end)
   end,
})

local Button = parryTab:CreateButton({
   Name = "auto parry 2.0",
   Callback = function()
   function Parry()
if Local.Character then
    local Remote = game:GetService("ReplicatedStorage"):WaitForChild("Remotes"):WaitForChild("ParryAttempt")
    local WorldToScreenPoint = Camera:WorldToScreenPoint(Local.Character.HumanoidRootPart.Position)
    local args = {
        [1] = 0.5,0.75,1.0,
        [2] = workspace.CurrentCamera.CFrame,
        [3] = PlayerPoints(),
        [4] = {
            [1] = WorldToScreenPoint.X,
            [2] = WorldToScreenPoint.Y
        }
    }

    warn("Players:", unpack(args[3]))
    Remote:FireServer(unpack(args))
                end
   end,
})

local Button = parryTab:CreateButton({
   Name = "manual spam mobile",
   Callback = function()
   local gui = Instance.new("ScreenGui")
gui.ResetOnSpawn = false 
gui.Parent = game.CoreGui 

local frame = Instance.new("Frame")
frame.Position = UDim2.new(0, 10, 0, 10)
frame.Size = UDim2.new(0, 150, 0, 75)
frame.BackgroundColor3 = Color3.new(0, 0, 0)
frame.BorderSizePixel = 0
frame.Parent = gui

local button = Instance.new("TextButton")
button.Text = "spam off"
button.Size = UDim2.new(1, -20, 1, -20)
button.Position = UDim2.new(0, 10, 0, 10)
button.BackgroundColor3 = Color3.new(1, 1, 1)
button.BorderColor3 = Color3.new(0, 0, 0)
button.BorderSizePixel = 2
button.Font = Enum.Font.SourceSans
button.TextColor3 = Color3.new(0, 0, 0)
button.TextSize = 16
button.Parent = frame

local activated = false

local function toggle()
    activated = not activated
    button.Text = activated and "spam on" or "spam off"
    
    while activated do
        local args = {
            [1] = 1.5,
            [2] = CFrame.new(-254.2939910888672, 112.13581848144531, -119.27256774902344) * CFrame.Angles(-2.029526710510254, 0.5662040710449219, 2.314905881881714),
            [3] = {
                ["2617721424"] = Vector3.new(-273.400146484375, -724.8031005859375, -20.92414093017578),
                
            },
            [4] = {
                [1] = 910,
                [2] = 154
            }
        }

        game:GetService("ReplicatedStorage").Remotes.ParryAttempt:FireServer(unpack(args))
        game:GetService("RunService").Heartbeat:Wait()
    end
end

button.MouseButton1Click:Connect(toggle)
   end,
})

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: