Run it
Copy the script and paste it into your executor.
Players = :()
RunService = :()
UserInputService = :()
Debris = :()
player = Players.LocalPlayer
spawnedBalls = {}
grabbableMode =
grabbedBall =
grabOffset = .()
activeFunConnection
()
player.Character player.CharacterAdded:()
()
():()
(label)
label.Text = ..#spawnedBalls
screenGui = .()
screenGui.Name =
screenGui.ResetOnSpawn =
screenGui.Parent = player:()
(frame)
dragging, dragInput, dragStart, startPos
frame.InputBegan:((input)
input.UserInputType == .UserInputType.MouseButton1 input.UserInputType == .UserInputType.Touch
dragging =
dragStart = input.Position
startPos = frame.Position
input.Changed:(()
input.UserInputState == .UserInputState.End
dragging =
)
)
frame.InputChanged:((input)
input.UserInputType == .UserInputType.MouseMovement input.UserInputType == .UserInputType.Touch
dragInput = input
)
UserInputService.InputChanged:((input)
dragging input == dragInput
delta = input.Position - dragStart
frame.Position = .(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
)
frame = .()
frame.Size = .(, , , )
frame.Position = .(, -, , -)
frame.BackgroundColor3 = .(,,)
frame.Parent = screenGui
(frame)
title = .()
title.Size = .(,,,)
title.BackgroundTransparency =
title.Text =
title.TextColor3 = .(,,)
title.Font = .Font.SourceSansBold
title.TextSize =
title.Parent = frame
xButton = .()
xButton.Size = .(,,,)
xButton.Position = .(,-,,)
xButton.Text =
xButton.TextScaled =
xButton.BackgroundColor3 = .(,,)
xButton.Parent = frame
amountBox = .()
amountBox.Size = .(,,,)
amountBox.Position = .(,,,)
amountBox.PlaceholderText =
amountBox.Text =
amountBox.TextScaled =
amountBox.Parent = frame
spawnButton = .()
spawnButton.Size = .(,,,)
spawnButton.Position = .(,,,)
spawnButton.Text =
spawnButton.TextScaled =
spawnButton.BackgroundColor3 = .(,,)
spawnButton.Parent = frame
deleteAllButton = .()
deleteAllButton.Size = .(,,,)
deleteAllButton.Position = .(,,,)
deleteAllButton.Text =
deleteAllButton.TextScaled =
deleteAllButton.BackgroundColor3 = .(,,)
deleteAllButton.Parent = frame
deleteAmountButton = .()
deleteAmountButton.Size = .(,,,)
deleteAmountButton.Position = .(,,,)
deleteAmountButton.Text =
deleteAmountButton.TextScaled =
deleteAmountButton.BackgroundColor3 = .(,,)
deleteAmountButton.Parent = frame
emergencyButton = .()
emergencyButton.Size = .(,,,)
emergencyButton.Position = .(,,,)
emergencyButton.Text =
emergencyButton.TextScaled =
emergencyButton.BackgroundColor3 = .(,,)
emergencyButton.Parent = frame
grabbableButton = .()
grabbableButton.Size = .(,,,)
grabbableButton.Position = .(,,,)
grabbableButton.Text =
grabbableButton.TextScaled =
grabbableButton.BackgroundColor3 = .(,,)
grabbableButton.Parent = frame
funButton = .()
funButton.Size = .(,,,)
funButton.Position = .(,,,)
funButton.Text =
funButton.TextScaled =
funButton.BackgroundColor3 = .(,,)
funButton.Parent = frame
spawnedLabel = .()
spawnedLabel.Size = .(,,,)
spawnedLabel.Position = .(,,,)
spawnedLabel.BackgroundTransparency =
spawnedLabel.TextColor3 = .(,,)
spawnedLabel.TextScaled =
spawnedLabel.Text =
spawnedLabel.Parent = frame
(amount)
hrp = ()
i = , amount
ball = .()
ball.Shape = .PartType.Ball
ball.Size = .(,,)
ball.Position = hrp.Position + hrp.CFrame.LookVector * (+i) + hrp.CFrame.RightVector * ((i%)-) *
ball.Anchored =
ball.BrickColor = BrickColor.()
ball.Parent =
.(spawnedBalls, ball)
bv = .()
bv.Velocity = hrp.CFrame.LookVector *
bv.MaxForce = .(,,)
bv.Parent = ball
Debris:(bv,)
(spawnedLabel)
()
_, ball (spawnedBalls)
ball ball.Parent ball:()
spawnedBalls = {}
(spawnedLabel)
(amount)
i = , amount
ball = .(spawnedBalls)
ball ball.Parent ball:()
(spawnedLabel)
()
hrp = ()
_, ball (spawnedBalls)
ball ball.Parent
ball.Position = hrp.Position + hrp.CFrame.LookVector *
(input)
grabbableMode input.UserInputType ~= .UserInputType.Keyboard
mousePos = input.Position
closest, minDist = , .huge
_, ball (spawnedBalls)
ball ball.Parent
screenPos, onScreen = .CurrentCamera:(ball.Position)
onScreen
dist = (.(screenPos.X, screenPos.Y) - .(mousePos.X, mousePos.Y)).Magnitude
dist < minDist dist <
closest = ball
minDist = dist
closest
grabbedBall = closest
ray = .CurrentCamera:(mousePos.X, mousePos.Y)
grabOffset = closest.Position - ray.Origin
(input)
grabbedBall
ray = .CurrentCamera:(input.Position.X,input.Position.Y)
grabbedBall.Position = ray.Origin + grabOffset
(input)
grabbedBall =
funGui
()
funGui funGui:()
activeFunConnection activeFunConnection:() activeFunConnection =
funGui = .()
funGui.Size = .(,,,)
funGui.Position = .(,,,)
funGui.BackgroundColor3 = .(,,)
funGui.Parent = screenGui
(funGui)
fTitle = .()
fTitle.Size = .(,,,)
fTitle.BackgroundTransparency =
fTitle.Text =
fTitle.TextColor3 = .(,,)
fTitle.TextScaled =
fTitle.Parent = funGui
fxButton = .()
fxButton.Size = .(,,,)
fxButton.Position = .(,-,,)
fxButton.Text =
fxButton.TextScaled =
fxButton.BackgroundColor3 = .(,,)
fxButton.Parent = funGui
fxButton.MouseButton1Click:(()
activeFunConnection activeFunConnection:() activeFunConnection=
funGui:()
)
cancelButton = .()
cancelButton.Size = .(,,,)
cancelButton.Position = .(,,,)
cancelButton.Text =
cancelButton.TextScaled =
cancelButton.BackgroundColor3 = .(,,)
cancelButton.Parent = funGui
cancelButton.MouseButton1Click:(()
activeFunConnection activeFunConnection:() activeFunConnection=
)
funOptions = {
{Name=, Func=()
hrp = ()
radius =
angle =
activeFunConnection activeFunConnection:()
activeFunConnection = RunService.Heartbeat:((dt)
angle = angle + dt*
i, ball (spawnedBalls)
ball ball.Parent
offset = .(.(angle+i)*radius,,.(angle+i)*radius)
ball.CFrame = .(hrp.Position + offset)
)
},
{Name=, Func=()
hrp = ()
radius =
angle =
activeFunConnection activeFunConnection:()
activeFunConnection = RunService.Heartbeat:((dt)
angle = angle + dt*
i, ball (spawnedBalls)
ball ball.Parent
offset = .(.(angle+i)*radius, + .(angle*+i), .(angle+i)*radius)
ball.CFrame = .(hrp.Position + offset)
)
},
{Name=, Func=()
activeFunConnection activeFunConnection:()
t =
activeFunConnection = RunService.Heartbeat:((dt)
t = t + dt*
i, ball (spawnedBalls)
ball ball.Parent
pos = ball.Position
ball.Position = .(pos.X, + .(t+i), pos.Z)
)
},
{Name=, Func=()
activeFunConnection activeFunConnection:()
t =
activeFunConnection = RunService.Heartbeat:((dt)
t = t + dt
i, ball (spawnedBalls)
ball ball.Parent
ball.Position = .(.(-,), .(,), .(-,))
)
}
}
i,opt (funOptions)
btn = .()
btn.Size = .(,,,)
btn.Position = .(,,,+*(i-))
btn.Text = opt.Name
btn.TextScaled =
btn.BackgroundColor3 = .(,,)
btn.Parent = funGui
btn.MouseButton1Click:(opt.Func)
spawnButton.MouseButton1Click:(()
amt = (amountBox.Text)
(amt)
)
deleteAllButton.MouseButton1Click:(deleteAllBalls)
deleteAmountButton.MouseButton1Click:(()
amt = (amountBox.Text)
(amt)
)
emergencyButton.MouseButton1Click:(emergencyRecovery)
xButton.MouseButton1Click:(()
()
activeFunConnection activeFunConnection:() activeFunConnection=
screenGui:()
)
grabbableButton.MouseButton1Click:(()
grabbableMode = grabbableMode
grabbableButton.Text = ..(grabbableMode )
)
funButton.MouseButton1Click:(openFunUI)
UserInputService.InputBegan:((input)
(input)
)
UserInputService.InputChanged:((input)
(input)
)
UserInputService.InputEnded:((input)
(input)
)
player.CharacterAdded:(()
RunService.Heartbeat:()
()
)A client-side script that allows you to spawn as many tiny balls you want & delete all or a certain amount. Mobile supported. And also it allows you to do fun things with the balls (eg, orbiting you, bouncing etc).