local KeySystemUI = loadstring(game:HttpGet("https://[Log in to view URL]"))()
KeySystemUI.New({
    ApplicationName = "BreadHub", -- Your Key System Application Name
    Name = "BreadHub", -- Your Script name
    Info = "Get Key For BreadHub", -- Info text in the GUI, keep empty for default text.
    DiscordInvite = "", -- Optional.
    AuthType = "clientid" -- Can select verifycation with ClientId or IP ("clientid" or "ip")
})
repeat task.wait() until KeySystemUI.Finished() or KeySystemUI.Closed
if KeySystemUI.Finished() and KeySystemUI.Closed == false then
    print("Key verified, can load script")
    local OrionLib = loadstring(game:HttpGet(('https://[Log in to view URL]')))()

local Window = OrionLib:MakeWindow({Name = "toppkid", HidePremium = false, SaveConfig = true, ConfigFolder = "toppkid"})

--[[
Name = <string> - The name of the UI.
HidePremium = <bool> - Whether or not the user details shows Premium status or not.
SaveConfig = <bool> - Toggles the config saving in the UI.
ConfigFolder = <string> - The name of the folder where the configs are saved.
IntroEnabled = <bool> - Whether or not to show the intro animation.
IntroText = <string> - Text to show in the intro animation.
IntroIcon = <string> - URL to the image you want to use in the intro animation.
Icon = <string> - URL to the image you want displayed on the window.
CloseCallback = <function> - Function to execute when the window is closed.
]]

local Tab = Window:MakeTab({
	Name = "toppkid",
	Icon = "nil",
	PremiumOnly = false
})

--[[
Name = <string> - The name of the tab.
Icon = <string> - The icon of the tab.
PremiumOnly = <bool> - Makes the tab accessible to Sirus Premium users only.
]]

local Section = Tab:AddSection({
	Name = "silent aim"
})

--[[
Name = <string> - The name of the section.
]]

Tab:AddButton({
	Name = "silent aim",
	Callback = function()
            -- change the settings below to your own liking, dont mess with the rest of the script though
getgenv().settings = {
    ["highlightHoop"] = true; -- when set to true it highlights the current hoop ur aimbotting at
    ["highlightInFooting"] = true; -- when set to true it highlights u if ur in correct footing
    ["debugMode"] = true; -- whether or not to output things like current distance and power into chat when shooting - helps me patch bugs
    ["aimbotKey"] = "X"; -- the key to aimbot with
}

if steppedConnection then
    steppedConnection:Disconnect()
    steppedConnection = nil
end

if inputConnection then
    inputConnection:Disconnect()
    inputConnection = nil
end

if getgenv().hoopHL == nil then
    getgenv().hoopHL = Instance.new("Highlight")
    hoopHL.Enabled = false
    hoopHL.FillColor = Color3.fromRGB(255, 25, 25)
    hoopHL.OutlineColor = Color3.fromRGB(255, 0, 0)
    hoopHL.Parent = game:GetService("CoreGui")
end

if getgenv().playerHL == nil then
    getgenv().playerHL = Instance.new("Highlight")
    playerHL.Enabled = false
    playerHL.FillColor = Color3.fromRGB(25, 255, 25)
    playerHL.OutlineColor = Color3.fromRGB(0, 255, 0)
    playerHL.Parent = game:GetService("CoreGui")
end

local plr = game:GetService("Players").LocalPlayer
local courts = game:GetService("Workspace").Courts
local repStorage = game:GetService("ReplicatedStorage")
local runService = game:GetService("RunService")
local inputService = game:GetService("UserInputService")

local shootingEvent = repStorage:WaitForChild("shootingEvent")
local cursorButton = plr.PlayerGui:WaitForChild("PowerUI"):WaitForChild("CursorButton")

local clickedEvent = getconnections(cursorButton.MouseButton1Click)[1].Function
local clientEvent = getconnections(shootingEvent.OnClientEvent)[1].Function

local canShoot = false

if workspace:FindFirstChild("PracticeArea") then
    workspace.PracticeArea.Parent = workspace.Courts
end

local order do
    for _, obj in next, getupvalues(getupvalue(clickedEvent, 1)) do
        if typeof(obj) == "table" and table.find(obj, "X1") then
            order = obj
        end
    end
end

local shootingData = {
    [75] = {
        {minDist = 57, maxDist = 59, arc = 55},
        {minDist = 59, maxDist = 60, arc = 50},
        {minDist = 60, maxDist = 61, arc = 45},
        {minDist = 61, maxDist = 62, arc = 40}
    },
    [80] = {
        {minDist = 57, maxDist = 59, arc = 75},
        {minDist = 59, maxDist = 63, arc = 70},
        {minDist = 63, maxDist = 65, arc = 60},
        {minDist = 65, maxDist = 69, arc = 50}
    },
    [85] = {
        {minDist = 57, maxDist = 61, arc = 90},
        {minDist = 61, maxDist = 64, arc = 85},
        {minDist = 64, maxDist = 66, arc = 80},
        {minDist = 66, maxDist = 69, arc = 75},
        {minDist = 69, maxDist = 70, arc = 70},
        {minDist = 70, maxDist = 72, arc = 65},
        {minDist = 72, maxDist = 74, arc = 60}
    }
}

-- fills a list with the goals in the practice area
local practiceGoals = {} do
    for _, obj in next, courts.PracticeArea:GetDescendants() do
        if obj.Name == "GoalHome" or obj.Name == "GoalAway" or obj.Name == "Goal" then
            table.insert(practiceGoals, obj)
        end
    end
end

-- fills a list with the basketball hoops in all of the courts
local hoops = {} do
    for _, obj in next, courts:GetDescendants() do
        if obj.Name == "Basketball Hoop" then
            table.insert(hoops, obj)
        end
    end
end

-- returns the current remote key
local function getKey()
    return getupvalue(clientEvent, 1)
end

-- returns the player's power value
local function getPower()
    return plr.Power.Value
end

-- returns the player's basketball if it exists
local function getBasketball()
    return plr.Character:FindFirstChild("Basketball")
end

-- waits for the localplayer's rootpart and returns it
local function getRoot()
    return plr.Character:WaitForChild("HumanoidRootPart", 1337)
end

-- waits for the localplayer's humanoid and returns it
local function getHumanoid()
    return plr.Character:WaitForChild("Humanoid", 1337)
end

-- waits for the localplayer's rootpart then returns it's position
local function getRootPosition()
    return getRoot().Position
end

-- waits for the localplayer's humanoid and returns it's movedirection
local function getMoveDirection()
    return getHumanoid().MoveDirection
end

-- waits for the localplayer's humanoid then returns it's current state
local function getHumanoidState()
    return getHumanoid():GetState()
end

-- waits for the localplayer's humanoid then sets it's current state
local function setHumanoidState(state)
    return getHumanoid():ChangeState(state)
end

-- returns the distance between 2 vectors in studs
local function getDistanceBetween(a, b)
    if typeof(a) == "Instance" then
        return (a.Position - b).Magnitude
    else
        return (a - b).Magnitude
    end
end

-- returns the number rounded to the nearest integer
local function roundNumber(num)
    return (num >= 0 and math.floor(num + 0.5)) or math.ceil(num - 0.5)
end

-- prints the input arguments if debugging is enabled
local function output(...)
    if settings["debugMode"] then
        print(...)
    end
end

-- returns the arc to use for the ball based on the input goal position and rootpart position
local function getArc(goalPosition, rootPosition, footingCheck)
    local distance = getDistanceBetween(goalPosition, rootPosition)
    local rounded = distance
    
    local power = getPower()
    local data = shootingData[power]

    if not footingCheck then
        output(power, rounded)
    else
        distance = distance + 5
    end
    
    if power ~= nil and data ~= nil then
        for _, info in ipairs(data) do
            if rounded >= info.minDist and rounded <= info.maxDist then
                if not footingCheck then
                    output(info.arc)
                end

                return info.arc, false
            end
        end
    end
end

-- returns the offset the shot should used based on the user's movedirection
local function getMovingOffset()
    local offset = getMoveDirection() * 1.8
    
    if inputService:IsKeyDown(Enum.KeyCode.S) == true and inputService:IsKeyDown(Enum.KeyCode.W) == true then
        offset = getMoveDirection() * 0.5
    elseif inputService:IsKeyDown(Enum.KeyCode.S) == true and inputService:IsKeyDown(Enum.KeyCode.W) == false then
        offset = getMoveDirection() * 0.8
    elseif inputService:IsKeyDown(Enum.KeyCode.S) == false and inputService:IsKeyDown(Enum.KeyCode.W) == true then
        offset = getMoveDirection() * 1.2
    end
        
    return offset
end


-- returns whether theres a possible arc for the current distance and power
local function isInFooting(goalPosition, rootPosition)
    return getArc(goalPosition, rootPosition, true) ~= nil
end

-- returns a court if player is in a game or in queue
-- falls back to the nearest practice court if they are not in either the aforementioned conditions
local function getCourt()
    for _, court in next, courts:GetChildren() do
        local players = court:FindFirstChild("_Players")

        if players ~= nil then
            for _, obj in next, players:GetChildren() do
                if obj.Value == plr then
                    return court, obj
                end
            end
        end
    end

    return courts.PracticeArea
end

-- returns the goal you score on in your court if you're in a game or in queue
-- falls back to the nearest goal if you're not in game or in queue
local function getGoal()
    local court, spot = getCourt()

    if court.Name == "PracticeArea" then
        local distance = math.huge
        local goal = nil

        for _, tempGoal in next, practiceGoals do
            local rootPosition = getRootPosition()
            local tempDistance = (rootPosition - tempGoal.Position).Magnitude

            if tempDistance < distance then
                distance = tempDistance
                goal = tempGoal
            end
        end

        return goal
    else
        if court:FindFirstChild("Goal") then
            return court.Goal
        end

        local prefix = string.split(spot.Name, "_")[1]
        local pad = court:FindFirstChild(prefix .. "_Core")

        local goalHome = court.GoalHome
        local goalAway = court.GoalAway

        local distHome = (pad.Position - goalHome.Position).Magnitude
        local distAway = (pad.Position - goalAway.Position).Magnitude

        if distHome > distAway then
            return goalHome
        else
            return goalAway
        end
    end
end

-- returns the closest basketball hoop to the input goal
local function getHoopFromGoal(goal)
    local distance = math.huge
    local hoop = nil

    for _, tempHoop in next, hoops do
        local part = tempHoop:FindFirstChildWhichIsA("BasePart")

        if part then
            local tempDistance = (part.Position - goal.Position).Magnitude

            if tempDistance < distance then
                distance = tempDistance
                hoop = tempHoop
            end
        end
    end

    return hoop
end

local function randomize(rootPos, dir)
    local unrandomized = {
        X1 = rootPos.X,
        Y1 = rootPos.Y,
        Z1 = rootPos.Z,
        X2 = dir.X,
        Y2 = dir.Y,
        Z2 = dir.Z
    }
    
    return {
        unrandomized[order[1]],
        unrandomized[order[2]],
        unrandomized[order[3]],
        unrandomized[order[4]],
        unrandomized[order[5]],
        unrandomized[order[6]]
    }
end

-- shoots the basketball
local function shoot()
    local goal = getGoal()
    local rootPosition = plr.Character.HumanoidRootPart.Position

    local arc = getArc(goal.Position, rootPosition, false)
    local offset = getMovingOffset()
    local hitPosition = goal.Position + Vector3.new(0, arc, 0) + offset
    
    local direction = (hitPosition - rootPosition).Unit
    local hit = randomize(rootPosition, direction)

    local basketball = getBasketball()
    local power = getPower()
    local remoteKey = getKey()

    shootingEvent:FireServer(basketball, power, hit, remoteKey)
end

getgenv().steppedConnection = runService.Stepped:Connect(function()
    local goal = getGoal()
    local rootPosition = plr.Character.HumanoidRootPart.Position

    if getBasketball() ~= nil then
        canShoot = isInFooting(goal.Position, rootPosition)
    else
        canShoot = false
    end

    if canShoot and settings["highlightInFooting"] then
        playerHL.Adornee = plr.Character
        playerHL.Enabled = true
    else
        playerHL.Enabled = false
    end

    if settings["highlightHoop"] then
        local hoop = getHoopFromGoal(goal)

        hoopHL.Adornee = hoop
        hoopHL.Enabled = true
    else
        hoopHL.Enabled = false
    end
end)

getgenv().inputConnection = inputService.InputBegan:Connect(function(key, gpe)
    if key.KeyCode == Enum.KeyCode[settings["aimbotKey"]] and not gpe and canShoot then
        if getHumanoidState() ~= Enum.HumanoidStateType.Freefall then
            setHumanoidState(Enum.HumanoidStateType.Jumping)
            task.wait(0.25)
        end
        
        shoot()
    end
end)
      		print("button pressed")
  	end    
})

--[[
Name = <string> - The name of the button.
Callback = <function> - The function of the button.
]]
else
    print("Player closed the GUI.")
end

Embed on website

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