M
Description
this script is to win every match
GAMEHoopz [CHRISTMAS🎄] (Basketball)
UPDATEDOct 11, 2026
ACCESSKeyless
PLATFORMDesktop
Script source Luau
-- [[ BloxScripts Risk Notice ]]
-- This script has not been verified by BloxScripts.fun. Deal with caution.
--
-- Stay safe:
-- • Never log in on unofficial Roblox sites or lookalike domains.
-- • Real Roblox links use roblox.com (check the .com ending).
-- • Treat fake Roblox login / "claim reward" pages as phishing.
-- [[ End BloxScripts Risk Notice ]]
lua
```
-- HoopsHubServer
-- Place in ServerScriptService
local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local folder = ReplicatedStorage:FindFirstChild("HoopsHubRemotes")
if not folder then
folder = Instance.new("Folder")
folder.Name = "HoopsHubRemotes"
folder.Parent = ReplicatedStorage
end
local updateSettings = folder:FindFirstChild("UpdateSettings")
if not updateSettings then
updateSettings = Instance.new("RemoteEvent")
updateSettings.Name = "UpdateSettings"
updateSettings.Parent = folder
end
local getSettings = folder:FindFirstChild("GetSettings")
if not getSettings then
getSettings = Instance.new("RemoteFunction")
getSettings.Name = "GetSettings"
getSettings.Parent = folder
end
local DEFAULTS = {
ballMags = 50,
ballReach = 10,
speed = 1,
autoGreen = false,
autoGuard = false,
lowArc = false,
highArc = false,
}
local settingsByPlayer = {}
local lastUpdate = {}
local function copySettings(source)
local result = {}
for key, value in pairs(source) do
result[key] = value
end
return result
end
local function clampNumber(value, minValue, maxValue)
if typeof(value) ~= "number" then
return nil
end
if value ~= value then
return nil
end
if value == math.huge or value == -math.huge then
return nil
end
return math.clamp(value, minValue, maxValue)
end
local function validBoolean(value)
return typeof(value) == "boolean"
end
local function initializePlayer(player)
settingsByPlayer[player] = copySettings(DEFAULTS)
lastUpdate[player] = 0
end
Players.PlayerAdded:Connect(initializePlayer)
for _, player in Players:GetPlayers() do
initializePlayer(player)
end
getSettings.OnServerInvoke = function(player)
if not settingsByPlayer[player] then
initializePlayer(player)
end
return copySettings(settingsByPlayer[player])
end
updateSettings.OnServerEvent:Connect(function(player, changes)
if typeof(changes) ~= "table" then
return
end
if not settingsByPlayer[player] then
initializePlayer(player)
end
-- Basic remote-event rate limit.
local now = os.clock()
if now - (lastUpdate[player] or 0) < 0.05 then
return
end
lastUpdate[player] = now
local current = settingsByPlayer[player]
-- Only accept known keys and validated values.
local numberRules = {
ballMags = {1, 50},
ballReach = {1, 10},
speed = {1, 5},
}
for key, limits in pairs(numberRules) do
if changes[key] ~= nil then
local value = clampNumber(
changes[key],
limits[1],
limits[2]
)
if value then
current[key] = math.floor(value)
end
end
end
local booleanKeys = {
"autoGreen",
"autoGuard",
"lowArc",
"highArc",
}
for _, key in ipairs(booleanKeys) do
if changes[key] ~= nil and validBoolean(changes[key]) then
current[key] = changes[key]
end
end
-- The two arc modes cannot both be enabled.
if changes.lowArc == true then
current.highArc = false
elseif changes.highArc == true then
current.lowArc = false
end
-- Replicate approved settings as server-authored attributes.
for key, value in pairs(current) do
player:SetAttribute("Hoops_" .. key, value)
end
end)
Players.PlayerRemoving:Connect(function(player)
settingsByPlayer[player] = nil
lastUpdate[player] = nil
end)
```
## 2. Create the draggable UI
In StarterPlayer → StarterPlayerScripts, create a `LocalScript` named `HoopsHubClient` and paste the following. This builds the menu, sliders, buttons, and mobile-friendly drag behavior.
lua
```
-- HoopsHubClient
-- Place in StarterPlayerScripts
local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local UserInputService = game:GetService("UserInputService")
local player = Players.LocalPlayer
local remotes = ReplicatedStorage:WaitForChild("HoopsHubRemotes")
local updateSettings = remotes:WaitForChild("UpdateSettings")
local getSettings = remotes:WaitForChild("GetSettings")
local settings = getSettings:InvokeServer()
local PURPLE = Color3.fromRGB(155, 80, 255)
local DARK = Color3.fromRGB(20, 20, 28)
local PANEL = Color3.fromRGB(32, 31, 43)
local WHITE = Color3.fromRGB(245, 243, 255)
local MUTED = Color3.fromRGB(175, 170, 195)
local gui = Instance.new("ScreenGui")
gui.Name = "HoopsHub"
gui.ResetOnSpawn = false
gui.DisplayOrder = 20
gui.Parent = player:WaitForChild("PlayerGui")
local main = Instance.new("Frame")
main.Name = "Main"
main.Size = UDim2.new(0, 320, 0, 480)
main.Position = UDim2.new(0.5, -160, 0.5, -240)
main.BackgroundColor3 = DARK
main.BorderSizePixel = 0
main.ClipsDescendants = true
main.Parent = gui
local mainCorner = Instance.new("UICorner")
mainCorner.CornerRadius = UDim.new(0, 12)
mainCorner.Parent = main
local stroke = Instance.new("UIStroke")
stroke.Color = PURPLE
stroke.Thickness = 1.5
stroke.Parent = main
local header = Instance.new("Frame")
header.Name = "Header"
header.Size = UDim2.new(1, 0, 0, 48)
header.BackgroundColor3 = PANEL
header.BorderSizePixel = 0
header.Parent = main
local title = Instance.new("TextLabel")
title.Size = UDim2.new(1, -90, 1, 0)
title.Position = UDim2.fromOffset(14, 0)
title.BackgroundTransparency = 1
title.Text = "🏀 HOOPS HUB"
title.TextColor3 = WHITE
title.TextSize = 19
title.Font = Enum.Font.GothamBold
title.TextXAlignment = Enum.TextXAlignment.Left
title.Parent = header
local close = Instance.new("TextButton")
close.Size = UDim2.fromOffset(36, 32)
close.Position = UDim2.new(1, -42, 0, 8)
close.BackgroundColor3 = Color3.fromRGB(90, 40, 110)
close.Text = "×"
close.TextSize = 24
close.TextColor3 = WHITE
close.Font = Enum.Font.GothamBold
close.Parent = header
Instance.new("UICorner", close).CornerRadius = UDim.new(0, 8)
local reopen = Instance.new("TextButton")
reopen.Name = "Reopen"
reopen.Size = UDim2.fromOffset(54, 46)
reopen.Position = UDim2.new(0, 16, 0.5, -23)
reopen.BackgroundColor3 = PURPLE
reopen.Text = "🏀"
reopen.TextSize = 24
reopen.Visible = false
reopen.Parent = gui
Instance.new("UICorner", reopen).CornerRadius = UDim.new(0, 12)
close.Activated:Connect(function()
main.Visible = false
reopen.Visible = true
end)
reopen.Activated:Connect(function()
main.Visible = true
reopen.Visible = false
end)
-- Drag using mouse or touch.
local dragging = false
local dragStart
local startPosition
header.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1
or input.UserInputType == Enum.UserInputType.Touch then
dragging = true
dragStart = input.Position
startPosition = main.Position
end
end)
UserInputService.InputChanged:Connect(function(input)
if not dragging then return end
if input.UserInputType == Enum.UserInputType.MouseMovement
or input.UserInputType == Enum.UserInputType.Touch then
local delta = input.Position - dragStart
main.Position = UDim2.new(
startPosition.X.Scale,
startPosition.X.Offset + delta.X,
startPosition.Y.Scale,
startPosition.Y.Offset + delta.Y
)
end
end)
UserInputService.InputEnded:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1
or input.UserInputType == Enum.UserInputType.Touch then
dragging = false
end
end)
local content = Instance.new("ScrollingFrame")
content.Name = "Content"
content.Position = UDim2.fromOffset(10, 56)
content.Size = UDim2.new(1, -20, 1, -66)
content.BackgroundTransparency = 1
content.BorderSizePixel = 0
content.ScrollBarThickness = 4
content.ScrollBarImageColor3 = PURPLE
content.AutomaticCanvasSize = Enum.AutomaticSize.Y
content.CanvasSize = UDim2.new()
content.Parent = main
local layout = Instance.new("UIListLayout")
layout.Padding = UDim.new(0, 8)
layout.SortOrder = Enum.SortOrder.LayoutOrder
layout.Parent = content
local function send(key, value)
settings[key] = value
updateSettings:FireServer({[key] = value})
end
local function makeLabel(text)
local label = Instance.new("TextLabel")
label.Size = UDim2.new(1, -4, 0, 24)
label.BackgroundTransparency = 1
label.Text = text
label.TextColor3 = WHITE
label.TextSize = 14
label.Font = Enum.Font.GothamBold
label.TextXAlignment = Enum.TextXAlignment.Left
label.Parent = content
return label
end
local function makeSlider(labelText, key, minValue, maxValue)
local holder = Instance.new("Frame")
holder.Size = UDim2.new(1, -4, 0, 58)
holder.BackgroundColor3 = PANEL
holder.BorderSizePixel = 0
holder.Parent = content
Instance.new("UICorner", holder).CornerRadius = UDim.new(0, 8)
local label = Instance.new("TextLabel")
label.Position = UDim2.fromOffset(10, 4)
label.Size = UDim2.new(1, -20, 0, 22)
label.BackgroundTransparency = 1
label.TextColor3 = WHITE
label.Font = Enum.Font.Gotham
label.TextSize = 13
label.TextXAlignment = Enum.TextXAlignment.Left
label.Parent = holder
local track = Instance.new("TextButton")
track.Position = UDim2.new(0, 10, 0, 35)
track.Size = UDim2.new(1, -20, 0, 12)
track.BackgroundColor3 = Color3.fromRGB(65, 62, 79)
track.Text = ""
track.AutoButtonColor = false
track.Parent = holder
Instance.new("UICorner", track).CornerRadius = UDim.new(1, 0)
local fill = Instance.new("Frame")
fill.BackgroundColor3 = PURPLE
fill.BorderSizePixel = 0
fill.Parent = track
Instance.new("UICorner", fill).CornerRadius = UDim.new(1, 0)
local function setFromX(x)
local alpha = math.clamp(
(x - track.AbsolutePosition.X) / track.AbsoluteSize.X,
0, 1
)
local value = math.floor(
minValue + alpha * (maxValue - minValue) + 0.5
)
send(key, value)
label.Text = labelText .. ": " .. value
fill.Size = UDim2.new(
(value - minValue) / (maxValue - minValue),
0, 1, 0
)
end
local function refresh()
local value = settings[key] or minValue
label.Text = labelText .. ": " .. value
fill.Size = UDim2.new(
(value - minValue) / (maxValue - minValue),
0, 1, 0
)
end
track.Activated:Connect(function()
setFromX(UserInputService:GetMouseLocation().X)
end)
track.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.Touch then
setFromX(input.Position.X)
end
end)
refresh()
end
local function makeToggle(labelText, key)
local button = Instance.new("TextButton")
button.Size = UDim2.new(1, -4, 0, 38)
button.BackgroundColor3 = PANEL
button.BorderSizePixel = 0
button.TextColor3 = WHITE
button.TextSize = 13
button.Font = Enum.Font.GothamMedium
button.Parent = content
Instance.new("UICorner", button).CornerRadius = UDim.new(0, 8)
local function refresh()
local enabled = settings[key] == true
button.Text = labelText .. " " ..
(enabled and "ON ●" or "OFF ○")
button.BackgroundColor3 = enabled and
Color3.fromRGB(72, 43, 105) or PANEL
end
button.Activated:Connect(function()
local value = not settings[key]
if key == "lowArc" and value then
settings.highArc = false
elseif key == "highArc" and value then
settings.lowArc = false
end
send(key, value)
refresh()
if key == "lowArc" then
-- Refresh the mutually exclusive option.
for _, child in ipairs(content:GetChildren()) do
if child:IsA("TextButton")
and child ~= button
and child.Name == "HighArcButton" then
child.Text = "High Arc " ..
(settings.highArc and "ON ●" or "OFF ○")
child.BackgroundColor3 = settings.highArc and
Color3.fromRGB(72, 43, 105) or PANEL
end
end
end
end)
if key == "highArc" then
button.Name = "HighArcButton"
elseif key == "lowArc" then
button.Name = "LowArcButton"
end
refresh()
end
makeLabel("BALL SETTINGS")
makeSlider("Ball Mags", "ballMags", 1, 50)
makeSlider("Ball Reach", "ballReach", 1, 10)
makeSlider("Speed", "speed", 1, 5)
makeLabel("GAMEPLAY OPTIONS")
makeToggle("Auto Green", "autoGreen")
makeToggle("Auto Guard", "autoGuard")
makeToggle("Low Arc", "lowArc")
makeToggle("High Arc", "highArc")
makeLabel("Settings are sent to your game's server.")
-- Adjust the menu on smaller screens.
local function resize()
local camera = workspace.CurrentCamera
if not camera then return end
local viewport = camera.ViewportSize
local width = math.min(320, viewport.X - 24)
local height = math.min(480, viewport.Y - 32)
main.Size = UDim2.fromOffset(width, height)
main.Position = UDim2.new(
0.5, -width / 2,
0.5, -height / 2
)
end
resize()
if workspace.CurrentCamera then
workspace.CurrentCamera:GetPropertyChangedSignal("ViewportSize")
:Connect(resize)
end
```
## 3. Connect settings to your basketball mechanics
The menu sends preferences to the server. It does not automatically create ball-magnet behavior, perfect shooting, or automatic defense; those need to be implemented in your own game mechanics.
For example, in a server-side shooting or movement script, read the validated settings like this:
lua
```
local function getHoopsSetting(player, settingName)
return player:GetAttribute("Hoops_" .. settingName)
end
-- Example: apply a permitted speed multiplier to a character.
local function applyMovementSetting(player)
local character = player.Character
local humanoid = character
and character:FindFirstChildOfClass("Humanoid")
if not humanoid then return end
local multiplier = getHoopsSetting(player, "speed") or 1
-- Set the base speed to your game's intended value.
local baseSpeed = 16
humanoid.WalkSpeed = baseSpeed * math.clamp(multiplier, 1, 5)
end
Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function()
task.wait(0.2)
applyMovementSetting(player)
end)
end)
```
If you use that final example, add `local Players = game:GetService("Players")` at the top of its script. Also call `applyMovementSetting(player)` after an approved speed setting changes; the example alone only applies speed on spawn.
## Important security notes
- Ball Mags and Ball Reach: treat these as game-design parameters. Validate actual ball ownership, distance, and possession on the server rather than trusting the client.
- Auto Green and Auto Guard: these are preferences only until you connect them to your own shooting and defense systems. Don't let a client award guaranteed baskets or manipulate other players.
- Speed: enforce the allowed movement range on the server. In a live competitive game, consider allowing only authorized users or training modes to use higher speeds.
- Remote events: the sample validates types and ranges, but a production game should also validate permissions and rate-limit each gameplay action.
One limitation: this starter UI is complete as a menu, but it isn't a complete basketball engine. The ball and shooting mechanics depend on how your own game currently handles possession, shot timing, and defense.Review the source before using it. Executions count successful copies, capped at 10 per user and network per script in 24 hours.
Community discussion
0Start the conversation.


Your community, in one place