
Keyless

--// SETTINGS
local TOOL_NAME = "BB-8"
local SPAM_DELAY = 0
--// SERVICES
local Players = game:GetService("Players")
local lp = Players.LocalPlayer
--// GUI
local gui = Instance.new("ScreenGui")
gui.Name = "BB8SpamGui"
gui.ResetOnSpawn = false
gui.Parent = lp:WaitForChild("PlayerGui")
local frame = Instance.new("Frame", gui)
frame.Size = UDim2.new(0, 220, 0, 120)
frame.Position = UDim2.new(0.5, -110, 0.5, -60)
frame.BackgroundColor3 = Color3.fromRGB(10,10,10)
frame.BorderSizePixel = 0
frame.Active = true
frame.Draggable = true
local title = Instance.new("TextLabel", frame)
title.Size = UDim2.new(1,0,0,30)
title.BackgroundTransparency = 1
title.Text = "BB-8 Auto Spam by CIBZOW"
title.TextColor3 = Color3.new(1,1,1)
title.Font = Enum.Font.SourceSansBold
title.TextSize = 22
local toggle = Instance.new("TextButton", frame)
toggle.Size = UDim2.new(1,-20,0,40)
toggle.Position = UDim2.new(0,10,0,50)
toggle.Text = "OFF"
toggle.BackgroundColor3 = Color3.fromRGB(180,48,56)
toggle.TextColor3 = Color3.new(1,1,1)
toggle.Font = Enum.Font.SourceSansBold
toggle.TextSize = 22
--// LOGIC
local spamming = false
local function getBB8()
local char = lp.Character
if not char then return end
for _,v in pairs(lp.Backpack:GetChildren()) do
if v:IsA("Tool") and v.Name:find(TOOL_NAME) then
return v
end
end
for _,v in pairs(char:GetChildren()) do
if v:IsA("Tool") and v.Name:find(TOOL_NAME) then
return v
end
end
end
-- spam loop
task.spawn(function()
while true do
task.wait(SPAM_DELAY)
if spamming then
local bb8 = getBB8()
if bb8 then
if bb8.Parent ~= lp.Character then
bb8.Parent = lp.Character
end
pcall(function()
bb8:Activate()
bb8:Deactivate()
end)
end
end
end
end)
-- toggle button
toggle.MouseButton1Click:Connect(function()
spamming = not spamming
if spamming then
toggle.Text = "ON"
toggle.BackgroundColor3 = Color3.fromRGB(40,170,40)
else
toggle.Text = "OFF"
toggle.BackgroundColor3 = Color3.fromRGB(170,40,40)
end
end)
Why are you loopingg every gear (children) in your backpack instead of simply using a single :FindFirstChild(TOOL_NAME) to get the gear? maybe I am a newgen self taught scriptkiddie that does not understand your advanced level of thinking.