local Players = game:GetService("Players")
local CoreGui = game:GetService("CoreGui")
local LocalPlayer = Players.LocalPlayer
local BotConfig = { Enabled = false, ImageURL = "" }
-- GUI
local ScreenGui = Instance.new("ScreenGui")
ScreenGui.Name = "CanvasBotGUI"
ScreenGui.ResetOnSpawn = false
ScreenGui.Parent = CoreGui or LocalPlayer:WaitForChild("PlayerGui")
local MainFrame = Instance.new("Frame")
MainFrame.Size = UDim2.new(0, 300, 0, 70)
MainFrame.Position = UDim2.new(0.05, 0, 0.3, 0)
MainFrame.BackgroundColor3 = Color3.fromRGB(20, 20, 20)
MainFrame.BorderSizePixel = 0
MainFrame.Active = true
MainFrame.Draggable = true
MainFrame.Parent = ScreenGui
local UICorner = Instance.new("UICorner")
UICorner.CornerRadius = UDim.new(0, 10)
UICorner.Parent = MainFrame
-- Title bar
local Title = Instance.new("TextLabel")
Title.Size = UDim2.new(1, 0, 0, 25)
Title.BackgroundColor3 = Color3.fromRGB(35, 35, 35)
Title.Text = "Anti-Crash Canvas Bot"
Title.TextColor3 = Color3.fromRGB(255, 255, 255)
Title.Font = Enum.Font.GothamBold
Title.TextSize = 14
Title.Parent = MainFrame
local UTCorner = Instance.new("UICorner")
UTCorner.CornerRadius = UDim.new(0, 10)
UTCorner.Parent = Title
-- URL Input
local TextBox = Instance.new("TextBox")
TextBox.Size = UDim2.new(0.7, -10, 0, 30)
TextBox.Position = UDim2.new(0, 10, 0, 35)
TextBox.Text = "Paste direct .png URL"
TextBox.TextColor3 = Color3.fromRGB(200, 200, 200)
TextBox.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
TextBox.Font = Enum.Font.Gotham
TextBox.TextSize = 13
TextBox.ClearTextOnFocus = false
TextBox.Parent = MainFrame
TextBox.FocusLost:Connect(function(enter)
if enter then BotConfig.ImageURL = TextBox.Text end
end)
-- Start/Stop Button
local ToggleBtn = Instance.new("TextButton")
ToggleBtn.Size = UDim2.new(0.28, -10, 0, 30)
ToggleBtn.Position = UDim2.new(0.72, 0, 0, 35)
ToggleBtn.Text = "LOAD"
ToggleBtn.TextColor3 = Color3.fromRGB(255, 255, 255)
ToggleBtn.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
ToggleBtn.Font = Enum.Font.GothamSemibold
ToggleBtn.TextSize = 13
ToggleBtn.Parent = MainFrame
local BtnCorner = Instance.new("UICorner")
BtnCorner.CornerRadius = UDim.new(0, 6)
BtnCorner.Parent = ToggleBtn
ToggleBtn.MouseEnter:Connect(function()
ToggleBtn.BackgroundColor3 = Color3.fromRGB(65, 65, 65)
end)
ToggleBtn.MouseLeave:Connect(function()
ToggleBtn.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
end)
-- Status Label
local StatusLabel = Instance.new("TextLabel")
StatusLabel.Size = UDim2.new(1, -20, 0, 20)
StatusLabel.Position = UDim2.new(0, 10, 0, 65)
StatusLabel.Text = "Status: Loading libraries..."
StatusLabel.TextColor3 = Color3.fromRGB(255, 165, 0)
StatusLabel.BackgroundTransparency = 1
StatusLabel.Font = Enum.Font.Gotham
StatusLabel.TextSize = 12
StatusLabel.TextWrapped = true
StatusLabel.Parent = MainFrame
-- Example toggle functionality
ToggleBtn.MouseButton1Click:Connect(function()
if BotConfig.Enabled then
BotConfig.Enabled = false
ToggleBtn.Text = "START"
ToggleBtn.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
StatusLabel.Text = "Status: Stopped."
else
if BotConfig.ImageURL == "" or not string.match(BotConfig.ImageURL, "http") then
StatusLabel.Text = "Error: Invalid URL!"
return
end
BotConfig.Enabled = true
ToggleBtn.Text = "STOP"
ToggleBtn.BackgroundColor3 = Color3.fromRGB(150, 40, 40)
StatusLabel.Text = "Status: Loading .png..."
-- PNG drawing logic here
end
end)