Auto Drop Ball
- 5
- views
- 57
- runs
About
Auto Drop ball
#kyelisz
Script
Version history
Loading…
loadstring(game:HttpGet("https://script.roscripts.io/x7kJ40i"))() local Players = game:GetService("Players") local ReplicatedStorage = game:GetService("ReplicatedStorage") local UserInputService = game:GetService("UserInputService") local player = Players.LocalPlayer --// ========================= --// GUI --// ========================= local gui = Instance.new("ScreenGui") gui.Name = "DropToggleUI" gui.ResetOnSpawn = false gui.Parent = player:WaitForChild("PlayerGui") --// WINDOW local window = Instance.new("Frame") window.Size = UDim2.fromOffset(300, 170) window.Position = UDim2.fromScale(0.5, 0.5) window.AnchorPoint = Vector2.new(0.5, 0.5) window.BackgroundColor3 = Color3.fromRGB(20, 20, 20) window.BorderSizePixel = 0 window.Active = true window.Parent = gui--// TITLE BAR local titleBar = Instance.new("Frame") titleBar.Size = UDim2.new(1, 0, 0, 45) titleBar.BackgroundColor3 = Color3.fromRGB(30, 30, 30) titleBar.BorderSizePixel = 0 titleBar.Active = true titleBar.Parent = window --// TITLE local title = Instance.new("TextLabel") title.Size = UDim2.new(1, -50, 1, 0) title.BackgroundTransparency = 1 title.Text = "Drop Controller" title.TextColor3 = Color3.new(1, 1, 1) title.TextSize = 18 title.Font = Enum.Font.SourceSansBold title.Parent = titleBar --// EXIT BUTTON local exit = Instance.new("TextButton") exit.Size = UDim2.fromOffset(45, 45) exit.Position = UDim2.new(1, -45, 0, 0) exit.BackgroundTransparency = 1 exit.Text = "X" exit.TextColor3 = Color3.new(1, 1, 1) exit.TextSize = 20 exit.Parent = titleBar --// TOGGLE BUTTON local toggle = Instance.new("TextButton") toggle.Size = UDim2.new(1, -40, 0, 60) toggle.Position = UDim2.new(0, 20, 0, 75) toggle.BackgroundColor3 = Color3.fromRGB(45, 45, 45) toggle.BorderSizePixel = 0 toggle.TextColor3 = Color3.new(1, 1, 1) toggle.TextSize = 20 toggle.Font = Enum.Font.SourceSansBold toggle.Text = "OFF" toggle.Parent = window --// ========================= --// LOOP --// ========================= local running = false local function startLoop() if running then return end running = true toggle.Text = "ON" task.spawn(function() while running and gui.Parent do ReplicatedStorage :WaitForChild("SlamAWinnerEvent") :FireServer("Drop") task.wait(0.1) end end) end local function stopLoop() running = false toggle.Text = "OFF" end --// ========================= --// TOGGLE --// ========================= toggle.Activated:Connect(function() if running then stopLoop() else startLoop() end end) --// ========================= --// EXIT --// ========================= exit.Activated:Connect(function() -- Stop the loop FIRST running = false -- Then remove the UI gui:Destroy() end) --// ========================= --// MOBILE + PC DRAGGING --// ========================= local dragging = false local dragStart local startPosition titleBar.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then dragging = true dragStart = input.Position startPosition = window.Position input.Changed:Connect(function() if input.UserInputState == Enum.UserInputState.End then dragging = false end end) 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 window.Position = UDim2.new( startPosition.X.Scale, startPosition.X.Offset + delta.X, startPosition.Y.Scale, startPosition.Y.Offset + delta.Y ) end end)
Comments · 0
Sign in to comment.
No comments yet.