1. local Players = game:GetService("Players")
  2. local CoreGui = game:GetService("CoreGui")
  3. local LocalPlayer = Players.LocalPlayer
  4.  
  5. local BotConfig = { Enabled = false, ImageURL = "" }
  6.  
  7. -- GUI
  8. local ScreenGui = Instance.new("ScreenGui")
  9. ScreenGui.Name = "CanvasBotGUI"
  10. ScreenGui.ResetOnSpawn = false
  11. ScreenGui.Parent = CoreGui or LocalPlayer:WaitForChild("PlayerGui")
  12.  
  13. local MainFrame = Instance.new("Frame")
  14. MainFrame.Size = UDim2.new(0, 300, 0, 70)
  15. MainFrame.Position = UDim2.new(0.05, 0, 0.3, 0)
  16. MainFrame.BackgroundColor3 = Color3.fromRGB(20, 20, 20)
  17. MainFrame.BorderSizePixel = 0
  18. MainFrame.Active = true
  19. MainFrame.Draggable = true
  20. MainFrame.Parent = ScreenGui
  21.  
  22. local UICorner = Instance.new("UICorner")
  23. UICorner.CornerRadius = UDim.new(0, 10)
  24. UICorner.Parent = MainFrame
  25.  
  26. -- Title bar
  27. local Title = Instance.new("TextLabel")
  28. Title.Size = UDim2.new(1, 0, 0, 25)
  29. Title.BackgroundColor3 = Color3.fromRGB(35, 35, 35)
  30. Title.Text = "Anti-Crash Canvas Bot"
  31. Title.TextColor3 = Color3.fromRGB(255, 255, 255)
  32. Title.Font = Enum.Font.GothamBold
  33. Title.TextSize = 14
  34. Title.Parent = MainFrame
  35.  
  36. local UTCorner = Instance.new("UICorner")
  37. UTCorner.CornerRadius = UDim.new(0, 10)
  38. UTCorner.Parent = Title
  39.  
  40. -- URL Input
  41. local TextBox = Instance.new("TextBox")
  42. TextBox.Size = UDim2.new(0.7, -10, 0, 30)
  43. TextBox.Position = UDim2.new(0, 10, 0, 35)
  44. TextBox.Text = "Paste direct .png URL"
  45. TextBox.TextColor3 = Color3.fromRGB(200, 200, 200)
  46. TextBox.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
  47. TextBox.Font = Enum.Font.Gotham
  48. TextBox.TextSize = 13
  49. TextBox.ClearTextOnFocus = false
  50. TextBox.Parent = MainFrame
  51. TextBox.FocusLost:Connect(function(enter)
  52. if enter then BotConfig.ImageURL = TextBox.Text end
  53. end)
  54.  
  55. -- Start/Stop Button
  56. local ToggleBtn = Instance.new("TextButton")
  57. ToggleBtn.Size = UDim2.new(0.28, -10, 0, 30)
  58. ToggleBtn.Position = UDim2.new(0.72, 0, 0, 35)
  59. ToggleBtn.Text = "LOAD"
  60. ToggleBtn.TextColor3 = Color3.fromRGB(255, 255, 255)
  61. ToggleBtn.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
  62. ToggleBtn.Font = Enum.Font.GothamSemibold
  63. ToggleBtn.TextSize = 13
  64. ToggleBtn.Parent = MainFrame
  65.  
  66. local BtnCorner = Instance.new("UICorner")
  67. BtnCorner.CornerRadius = UDim.new(0, 6)
  68. BtnCorner.Parent = ToggleBtn
  69.  
  70. ToggleBtn.MouseEnter:Connect(function()
  71. ToggleBtn.BackgroundColor3 = Color3.fromRGB(65, 65, 65)
  72. end)
  73. ToggleBtn.MouseLeave:Connect(function()
  74. ToggleBtn.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
  75. end)
  76.  
  77. -- Status Label
  78. local StatusLabel = Instance.new("TextLabel")
  79. StatusLabel.Size = UDim2.new(1, -20, 0, 20)
  80. StatusLabel.Position = UDim2.new(0, 10, 0, 65)
  81. StatusLabel.Text = "Status: Loading libraries..."
  82. StatusLabel.TextColor3 = Color3.fromRGB(255, 165, 0)
  83. StatusLabel.BackgroundTransparency = 1
  84. StatusLabel.Font = Enum.Font.Gotham
  85. StatusLabel.TextSize = 12
  86. StatusLabel.TextWrapped = true
  87. StatusLabel.Parent = MainFrame
  88.  
  89. -- Example toggle functionality
  90. ToggleBtn.MouseButton1Click:Connect(function()
  91. if BotConfig.Enabled then
  92. BotConfig.Enabled = false
  93. ToggleBtn.Text = "START"
  94. ToggleBtn.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
  95. StatusLabel.Text = "Status: Stopped."
  96. else
  97. if BotConfig.ImageURL == "" or not string.match(BotConfig.ImageURL, "http") then
  98. StatusLabel.Text = "Error: Invalid URL!"
  99. return
  100. end
  101. BotConfig.Enabled = true
  102. ToggleBtn.Text = "STOP"
  103. ToggleBtn.BackgroundColor3 = Color3.fromRGB(150, 40, 40)
  104. StatusLabel.Text = "Status: Loading .png..."
  105. -- PNG drawing logic here
  106. end
  107. end)