White board gui issue (Increasing Size)

I wanted to make this because I’m making a windows XP game and I wanted a increase size of the dot button and possibly a decrease size but I don’t know how to code good so here is my code thx

–CODE–

–Service
local player = game:GetService("Players").LocalPlayer local mouse = player:GetMouse()

–Gui
local frame = script.Parent local ClearButton = script.Parent:WaitForChild("ClearButton")

–Value
local dotColor = Color3.new(0,0,0) local pressed = false local x,y,dot

mouse.Button1Down:Connect(function() pressed = true end)

mouse.Button1Up:Connect(function() pressed = false end)

game:GetService("RunService").RenderStepped:Connect(function() x = mouse.X; y = mouse.Y if pressed == true then dot = Instance.new("Frame") dot.Name = "Dot" dot.BorderSizePixel = 0 dot.Parent = frame dot.BackgroundColor3 = dotColor dot.Size = UDim2.new(0, 6, 0, 6) dot.Position = UDim2.new(0, x - frame.AbsolutePosition.X, 0, y - frame.AbsolutePosition.Y) end end)

ClearButton.MouseButton1Click:Connect(function() for i, q in pairs(frame:GetChildren()) do if q.Name == "Dot" then q:Destroy() end end end)

for number,buttons in pairs(frame:GetChildren()) do --get all things if buttons:IsA("TextButton") and buttons:GetAttribute("dotColor") then -- filter buttons with attribute named dotcolor buttons.MouseButton1Up:Connect(function() dotColor = buttons:GetAttribute("dotColor") --change dotcolor to color in attribute end) end end

MoreSize.MouseButton1Click:Connect(function() dot.Size = UDim2.new(0, 99, 0, 6) end end end)