(game:GetService("\082\117\110\083\101\114\118\105\099\101")).Stepped:Connect(function()if canvas.Visible==true and cursor.Visible==true then local g=math.abs(mouse.X-canvas.AbsolutePosition.X)local r=math.abs(mouse.Y-canvas.AbsolutePosition.Y)cursor.Position=UDim2.new(g/canvas.AbsoluteSize.X,0,r/canvas.AbsoluteSize.Y,0)cursor.Size=UDim2.new(0,currentSize,0,currentSize)if down then local J=script.Paint:Clone()J.Position=UDim2.new(g/canvas.AbsoluteSize.X,0,r/canvas.AbsoluteSize.Y,0)J.Size=UDim2.new(0,currentSize,0,currentSize)J.ImageColor3=erasing and Color3.fromRGB(185,185,185)or currentColor J.Parent=paintContainer end end end)

game:GetService("RunService").Stepped:Connect(function()
	
	if canvas.Visible == true and cursor.Visible == true then
		
		local x = math.abs(mouse.X - canvas.AbsolutePosition.X)
		local y = math.abs(mouse.Y - canvas.AbsolutePosition.Y)
		
		cursor.Position = UDim2.new(x/canvas.AbsoluteSize.X, 0, y/canvas.AbsoluteSize.Y, 0)
		cursor.Size = UDim2.new(0, currentSize, 0, currentSize)
	
		if down then
				
			local paint = script.Paint:Clone()
				
			paint.Position = UDim2.new(x/canvas.AbsoluteSize.X, 0, y/canvas.AbsoluteSize.Y, 0)
			paint.Size = UDim2.new(0, currentSize, 0, currentSize)
				
			paint.ImageColor3 = erasing and Color3.fromRGB(185, 185, 185) or currentColor
				
			paint.Parent = paintContainer
		end
	end
end)

